Le menu de la page principale après s'être authentifié est ok

This commit is contained in:
DahoudG
2024-08-27 18:53:20 +00:00
parent e233f9f392
commit c653098560
16 changed files with 478 additions and 48 deletions

View File

@@ -0,0 +1,21 @@
class Validators {
static String? validateEmail(String? value) {
if (value == null || value.isEmpty) {
return 'Veuillez entrer votre email';
}
if (!RegExp(r'^[^@]+@[^@]+\.[^@]+').hasMatch(value)) {
return 'Veuillez entrer un email valide';
}
return null;
}
static String? validatePassword(String? value) {
if (value == null || value.isEmpty) {
return 'Veuillez entrer votre mot de passe';
}
if (value.length < 6) {
return 'Le mot de passe doit comporter au moins 6 caractères';
}
return null;
}
}