resolveEmailValidationIssue function
Default English messages for email validation issues.
Implementation
String resolveEmailValidationIssue(EmailValidationIssue issue) {
return switch (issue) {
EmailEmptyIssue() => 'Please enter an email address',
EmailInvalidFormatIssue() => 'Please enter a valid email address',
EmailTooLongIssue(:final maxLength) =>
'Email must not exceed $maxLength characters',
EmailLocalPartTooLongIssue(:final maxLength) =>
'Email name must not exceed $maxLength characters',
EmailDomainTooLongIssue(:final maxLength) =>
'Email domain must not exceed $maxLength characters',
EmailDisposableDomainIssue() =>
'Disposable email addresses are not allowed',
EmailBlockedDomainIssue() => 'Email domain is not allowed',
};
}