pull/309/head
haroon amjad 1 day ago
parent 3759a0c7c8
commit 4b3c986dc2

@ -284,10 +284,14 @@ class AuthenticationViewModel extends ChangeNotifier {
// Validate based on selected country // Validate based on selected country
if (selectedCountrySignup == CountryEnum.saudiArabia) { if (selectedCountrySignup == CountryEnum.saudiArabia) {
if (!ValidationUtils.validateIqama(nationalIdController.text)) { if (cleanedId.length == 10) {
_nationalIdError = LocaleKeys.pleaseEnterAValidIqamaID.tr(); if (!ValidationUtils.validateIqama(nationalIdController.text)) {
notifyListeners(); _nationalIdError = LocaleKeys.pleaseEnterAValidIqamaID.tr();
return false; notifyListeners();
return false;
}
} else {
return true;
} }
} else if (selectedCountrySignup == CountryEnum.unitedArabEmirates) { } else if (selectedCountrySignup == CountryEnum.unitedArabEmirates) {
if (!ValidationUtils.validateUaeNationalId(nationalIdController.text)) { if (!ValidationUtils.validateUaeNationalId(nationalIdController.text)) {

Loading…
Cancel
Save