validation method
Implementation
Future<bool> validation() async {
if (profileName.text.trim().isEmpty) {
toToast(AppConstants.pleaseEnterUserName);
return false;
} else if (profileName.text.trim().length < 3) {
toToast(AppConstants.userNameTooShort);
return false;
} else if (profileEmail.text.trim().isEmpty) {
toToast(AppConstants.emailNotEmpty);
return false;
} else if (!emailPatternMatch.hasMatch(profileEmail.text.toString())) {
toToast(AppConstants.pleaseEnterValidMail);
return false;
} else if (!(await validMobileNumber(
profileMobile.text.replaceAll("+", Constants.emptyString)))) {
toToast(AppConstants.pleaseEnterValidMobileWithCode);
return false;
} /*else if (profileStatus.value.isEmpty) {
toToast("Enter Profile Status");
return false;
}*/
else {
return true;
}
}