Click here to Skip to main content
14,921,874 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When iam clicking on my textbox it accepting charaters and displaying enter the 10 character when i enter 10 characters it showing enter 10 digits number for phone Number

What I have tried:

My .cs Code
[Required(ErrorMessage ="enter 6 Digits Number")]
[Range(0, int.MaxValue, ErrorMessage = "Please enter valid integer Number")]
public string Pincode { get; set; }

[Required(ErrorMessage = "Phone Required")]
[Range(0, int.MaxValue, ErrorMessage = "Please enter valid integer Number")]
public string Phone { get; set;

.cshtml

@Html.ValidationMessageFor(model => model.Pincode)
@Html.ValidationMessageFor(model => model.Phone)
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900