[](https://i.sstatic.net/g7mFS.png)
Here i tried to use data annotations , i tried to implement Range annotation on salary data type which i declared as a int type but even though i tried to enter data as integer only but still its showing error message (please enter number only) and i have tried executing without data annotations method working successfully but not working with the dataannotation range with this specific type only
HOW CAN SEARCH AND FIND THE PROBLEM TO SOLVE THIS ISSUE
The Regular expression Data Annotation is wrong. Use this instead
[RegularExpression(@"^[0-9]{4,5}$", ErrorMessage = "Please enter only numbers ")]