pull/309/head
haroon amjad 2 days ago
parent 3759a0c7c8
commit 4b3c986dc2

@ -284,11 +284,15 @@ class AuthenticationViewModel extends ChangeNotifier {
// Validate based on selected country // Validate based on selected country
if (selectedCountrySignup == CountryEnum.saudiArabia) { if (selectedCountrySignup == CountryEnum.saudiArabia) {
if (cleanedId.length == 10) {
if (!ValidationUtils.validateIqama(nationalIdController.text)) { if (!ValidationUtils.validateIqama(nationalIdController.text)) {
_nationalIdError = LocaleKeys.pleaseEnterAValidIqamaID.tr(); _nationalIdError = LocaleKeys.pleaseEnterAValidIqamaID.tr();
notifyListeners(); notifyListeners();
return false; 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)) {
_nationalIdError = LocaleKeys.pleaseEnterAValidNationalID.tr(); _nationalIdError = LocaleKeys.pleaseEnterAValidNationalID.tr();

Loading…
Cancel
Save