# Student Email, Numeric and Date Validation Upgrade

## Implemented
- Student email is mandatory on direct admission, internal application entry, public online application and bulk import.
- Duplicate email checks display a friendly message instead of the raw SQLSTATE exception.
- Failed validation retains entered form values; password, hidden and file fields are excluded from automatic restoration.
- Blank legacy student email and ID values are normalized to database NULL so unique indexes do not treat repeated empty strings as duplicates.
- Student ID, National ID, KCPE/KCSE numbers, year of birth and phone fields accept digits only, with browser and server validation.
- Date and date-time fields use the browser date picker; date-like text fields are upgraded to date inputs automatically where appropriate.
- Existing applications without a valid email cannot be approved until an email is supplied.

## Deployment
Run `database/migrations/2026_07_25_required_student_email_validation.sql` once on an existing database, or use the normal project migration process. Back up the database first.
