18 lines
343 B
Dart
18 lines
343 B
Dart
class ValidatorUtil {
|
|
static bool isValidEmail(String email) {
|
|
if (RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(email)) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
static bool isValidPassword(String password) {
|
|
if (password.length > 7) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
}
|