I am using this regular expression for mobile number,
- [Required(ErrorMessage = "Required")]
- [DataType(DataType.PhoneNumber)]
- [RegularExpression(@"^[\+\d]+(?:[\d-.\s()]*)$", ErrorMessage = "Not a valid Mobile number")]
- public string MobileNumbers { get; set; }
But not happening validation when enter less than 10 min number.
And for email validation,
- [Required(ErrorMessage = "Required")]
- [EmailAddress(ErrorMessage = "Invalid Email Address")]
- public string EmailIDs { get; set; }
But this is not working when enter look like this,
How can I solve this issues? please help me...