Forums - C# Corner

Forum guidelines
venkata seshu

venkata seshu

  • 1.4k
  • 18
  • 498

How to give validation for password in mvc

Apr 21 2017 5:36 AM
password to be 8 characters long with at least 1 special character, 1 numeral and mix of letters
 
what I have tried :-
 
[Required(ErrorMessage = "Please enter the Password")]
[DataType(DataType.Password)]
[StringLength(8, ErrorMessage = "The Password must be at least 5 - 8 characters long.", MinimumLength = 5)]
[Display(Name = "Password")]
public string Password { get; set; } 

Answers (1)

File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!