Add your validation rules to the model, and make sure you include the jQuery validation scripts in your page.
Adding Validation | Microsoft Docs[
^]
[Required]
public string Cell_Number { get; set; }
[Required]
[RegularExpression(@"^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$")]
[Display(Name = "Postal / Zip Code")]
public string Code { get; set; }
NB: In both cases, you're trying to set the
ID
to a value with a space in it. Don't do that:
id's
value must not contain whitespace (spaces, tabs etc.).