/**
 * Client-side UX validation only; server is authoritative (UMP + UMC domains).
 */
export const INSTITUTIONAL_EMAIL_RE = /^[a-zA-Z0-9._%+-]+@(ump|umc)\.edu\.vn$/i;

export const INSTITUTIONAL_EMAIL_HINT =
  'Vui lòng sử dụng email có đuôi @ump.edu.vn hoặc @umc.edu.vn';

export function validateInstitutionalEmail(email: string): boolean {
  return INSTITUTIONAL_EMAIL_RE.test(email.trim().toLowerCase());
}
