|
|
|
|
@ -126,10 +126,12 @@ class _Login extends State<Login> {
|
|
|
|
|
),
|
|
|
|
|
DefaultButton(
|
|
|
|
|
TranslationBase.of(context).login,
|
|
|
|
|
isButtonDisabled
|
|
|
|
|
? null
|
|
|
|
|
: () {
|
|
|
|
|
() {
|
|
|
|
|
if (isButtonDisabled) {
|
|
|
|
|
AppToast.showErrorToast(message: "National ID can only contain numbers");
|
|
|
|
|
} else {
|
|
|
|
|
this.startLogin();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
disabledColor: Color(0xff575757),
|
|
|
|
|
),
|
|
|
|
|
@ -227,7 +229,7 @@ class _Login extends State<Login> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void validateForm() {
|
|
|
|
|
if (util.validateIDBox(nationalIDorFile.text, loginType) == true && util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) {
|
|
|
|
|
if (util.validateIDBox(nationalIDorFile.text, loginType) == true && (countryCode == "971" ? true : util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true)) {
|
|
|
|
|
setState(() {
|
|
|
|
|
isButtonDisabled = false;
|
|
|
|
|
});
|
|
|
|
|
|