Password requirement validation added
This commit is contained in:
parent
66e35cf8c8
commit
04f1b31fb2
2 changed files with 37 additions and 4 deletions
|
|
@ -39,8 +39,7 @@ class _MyTextFieldState extends State<MyTextField> {
|
|||
return null;
|
||||
} else if (text.isEmpty) {
|
||||
return "${widget.hintText} is required";
|
||||
} else if (widget.hintText == "Email" &&
|
||||
!isEmailValid(widget.controller.text)) {
|
||||
} else if (widget.hintText == "Email" && !isEmailValid(text)) {
|
||||
return "Enter a valid email address";
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue