EmailAddress field validation

The Required validation was straightforward, but email validation is a little bit different; each developer would adopt different approaches for the validation. The emergence of jQuery validation provided consistent behavior for most of the validations. Later, the standard set by the HTML5 team is not adopted widely by all browsers and development teams.

Let's explore the EmailAddress built-in validation which would allow us to validate whether the value is a valid email or not. The following steps will help us in understanding how validation works:

  1. The data annotation was already discussed; we will be using the EmailAddress attribute in this section.

  2. The MVC engine scaffolding part, the validations, populating ...

Get Mastering Entity Framework Core 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.