net10.0
namespace Microsoft.EntityFrameworkCore.TestModels.MusicStore
{
    public class Order
    {
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email Address")]
        [RegularExpression("[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}", ErrorMessage = "Email is not valid.")]
        [Required]
        public string Email { get; set; }
    }
}
.NET
10.0
Information specific to net10.0
Assembly

Microsoft.EntityFrameworkCore.Specification.Tests , Version=10.0.1.0, PublicKeyToken=adb9793829ddae60

Referencing

Your project needs a package reference to Microsoft.EntityFrameworkCore.Specification.Tests.

Package Microsoft.EntityFrameworkCore.Specification.Tests (10.0.1) net10.0
Platform Restrictions

The property getter is supported on all platforms.

The property setter is supported on all platforms.

  • Built-in API
  • Package-provided API