Skip to content

Commit 2c229d7

Browse files
committed
fix(shopinbit): dumb hacked check for first and last name
1 parent 1232ed8 commit 2c229d7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

lib/pages/shopinbit/shopinbit_shipping_view.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,24 @@ class _ShopInBitShippingViewState extends ConsumerState<ShopInBitShippingView> {
7979
if (_submitting) return false;
8080
final shippingValid =
8181
_nameController.text.trim().isNotEmpty &&
82+
_nameController.text
83+
.split(" ")
84+
.map((e) => e.trim())
85+
.where((e) => e.isNotEmpty)
86+
.length >
87+
1 &&
8288
_streetController.text.trim().isNotEmpty &&
8389
_cityController.text.trim().isNotEmpty &&
8490
_postalCodeController.text.trim().isNotEmpty;
8591
if (!shippingValid) return false;
8692
if (_differentBilling) {
8793
return _billingNameController.text.trim().isNotEmpty &&
94+
_billingNameController.text
95+
.split(" ")
96+
.map((e) => e.trim())
97+
.where((e) => e.isNotEmpty)
98+
.length >
99+
1 &&
88100
_billingStreetController.text.trim().isNotEmpty &&
89101
_billingCityController.text.trim().isNotEmpty &&
90102
_billingPostalCodeController.text.trim().isNotEmpty &&

0 commit comments

Comments
 (0)