Phase 1 API's complition 1.1

fatima
devmirza121 4 years ago
parent 3a9dfbdc0b
commit 2e44f4170d

@ -110,6 +110,7 @@ class _CompleteProfilePageState extends State<CompleteProfilePage> {
}
Future<void> performCompleteProfile() async {
if(validateStructure(password??"")){
if (password == confirmPassword) {
print(widget.user.data!.userId??"userId");
Utils.showLoading(context);
@ -126,5 +127,15 @@ class _CompleteProfilePageState extends State<CompleteProfilePage> {
} else {
Utils.showToast("Please enter same password");
}
}else{
Utils.showToast("Password Should contains character, Number, Capital and small letters");
}
}
bool validateStructure(String value){
String pattern = r'^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[!@#\$&*~]).{6,}$';
RegExp regExp = new RegExp(pattern);
return regExp.hasMatch(value);
}
}

@ -128,4 +128,6 @@ class RegisterPage extends StatelessWidget {
}
return isValid;
}
}

Loading…
Cancel
Save