25-12-1/1

This commit is contained in:
Hamza-Ayed
2025-12-01 07:52:54 +03:00
parent b1b8efdd7d
commit 9b1008a0bf
40 changed files with 2471 additions and 2039 deletions

View File

@@ -121,6 +121,29 @@ class RegistrationView extends StatelessWidget {
},
),
const SizedBox(height: 16),
TextFormField(
controller: c.bithdateController,
decoration: InputDecoration(
labelText: 'سنة الميلاد'.tr,
hintText: '1999'.tr,
border: const OutlineInputBorder(),
),
keyboardType: TextInputType.number,
validator: (v) {
if (v == null || v.isEmpty) {
return 'Required field'.tr;
}
if (v.length != 4) {
return 'Birth year must be 4 digits'.tr;
}
// Optional: check if its a valid number
if (int.tryParse(v) == null) {
return 'Enter a valid year'.tr;
}
return null;
},
),
const SizedBox(height: 16),
TextFormField(
controller: c.driverLicenseExpiryController,
decoration: InputDecoration(