Skip to content

ValidateEmailAttribute constructor

Requires a text to be an email address, by Pattern, which is stricter than EmailAddressAttribute, as that only checks for an @ that is not the first or the last character, and can not be derived from. Like it, it is a DataTypeAttribute of EmailAddress, which tools like OpenAPI read. The forms also check it. An empty value is valid, as being required is RequiredAttribute's concern.

public ValidateEmailAttribute()

See Also