fix(inscription-am): étape 1/2 obligatoires alignées API (min 2 car., photo)
- Étape 1 : prénom/nom min 2 caractères (minPersonNameLength sur PersonalInfoFormScreen pour AM) - Étape 2 : ville/pays naissance min 2 ; photo réelle + consentement obligatoires ; isStep2Complete strict - registerAM : lieu naissance trim + toujours envoyer photo_base64 ; lieu_* non null si valide - Étape 4 : blocage envoi si isRegistrationComplete faux Made-with: Cursor
This commit is contained in:
@@ -106,11 +106,11 @@ class AmRegistrationData extends ChangeNotifier {
|
||||
|
||||
// --- Getters for validation or display ---
|
||||
bool get isStep1Complete =>
|
||||
firstName.isNotEmpty &&
|
||||
lastName.isNotEmpty &&
|
||||
streetAddress.isNotEmpty && // Modifié
|
||||
postalCode.isNotEmpty && // Nouveau
|
||||
city.isNotEmpty && // Nouveau
|
||||
firstName.trim().length >= 2 &&
|
||||
lastName.trim().length >= 2 &&
|
||||
streetAddress.isNotEmpty &&
|
||||
postalCode.isNotEmpty &&
|
||||
city.isNotEmpty &&
|
||||
phone.isNotEmpty &&
|
||||
email.isNotEmpty;
|
||||
// password n'est pas requis à l'inscription (défini après validation par lien email)
|
||||
@@ -123,11 +123,12 @@ class AmRegistrationData extends ChangeNotifier {
|
||||
!photoPath!.startsWith('assets/'));
|
||||
|
||||
bool get isStep2Complete =>
|
||||
(_hasUserPhoto ? photoConsent == true : true) &&
|
||||
_hasUserPhoto &&
|
||||
photoConsent == true &&
|
||||
dateOfBirth != null &&
|
||||
birthCity.isNotEmpty &&
|
||||
birthCountry.isNotEmpty &&
|
||||
nir.isNotEmpty && // Basic check, could add validation
|
||||
birthCity.trim().length >= 2 &&
|
||||
birthCountry.trim().length >= 2 &&
|
||||
nir.isNotEmpty &&
|
||||
agrementNumber.isNotEmpty &&
|
||||
agreementDate != null &&
|
||||
capacity != null &&
|
||||
|
||||
Reference in New Issue
Block a user