feat(inscription): email accusé réception, photos enfants, formulaires identité
- Backend: mail après inscription parent avec n° dossier, UPLOAD_PHOTOS_DIR, réponse API - Frontend: imageBytes + payload photo, utils email/code postal/téléphone, champs dédiés - Formulaires admin, login (focus), personal_info, child_card, custom_app_text_field Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
/// Saisie code postal français : uniquement des chiffres, au plus 5.
|
||||
final List<TextInputFormatter> kFrenchPostalCodeInputFormatters = [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
LengthLimitingTextInputFormatter(5),
|
||||
];
|
||||
|
||||
/// Valide un code postal français (exactement 5 chiffres).
|
||||
String? validateFrenchPostalCode(String? raw, {bool allowEmpty = false}) {
|
||||
final s = raw?.trim() ?? '';
|
||||
if (s.isEmpty) {
|
||||
return allowEmpty ? null : 'Ce champ est obligatoire';
|
||||
}
|
||||
if (s.length != 5 || int.tryParse(s) == null) {
|
||||
return 'Le code postal doit comporter 5 chiffres.';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user