isEmpty validation added to service
This commit is contained in:
parent
4fb9992dfa
commit
46e41d9c8b
1 changed files with 7 additions and 0 deletions
|
|
@ -1,4 +1,11 @@
|
||||||
class MihValidationServices {
|
class MihValidationServices {
|
||||||
|
String? isEmpty(String? value) {
|
||||||
|
if (value == null || value.isEmpty) {
|
||||||
|
return "This field is required";
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
String? validateEmail(String? email) {
|
String? validateEmail(String? email) {
|
||||||
if (email == null || email.isEmpty) {
|
if (email == null || email.isEmpty) {
|
||||||
return "Email is required";
|
return "Email is required";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue