Currently, it looks like:
[EmailAddress]
public string Email { get; set; }
Currently, we are using [EmailAddress] validator data annotation for a field, but also need to allow "" (empty string) as well. If we do not allow for "" (empty string), then we will break old versions of our front-end apps.
How can I use data annotations to allow for an email address, or an empty string, for a given data field?
I understand that the front-end apps should be sending null instead of "" (empty string), and then I could just keep the field as optional, but it is too late, as old versions of the apps cannot be eradicated from the wild, and need to continue to work.
Thank you!
