Hi
I have given below Data Annotation but it does not display message at Client Side even if no of characters entered is more than 4
[Required(ErrorMessage = "Id cannot be Blank. Max length should be less than or equal to 4."), MaxLength(4)]
Secondly if only alphabets are entered then also it gives error message - Special characters are not allowed.
Thanks


Sachin SinghRank #66 · 26.2K reputationPosted Jun 21, 2021, 4:31 AM EDT
Farhan AhmedRank #73 · 25K reputationPosted Jun 20, 2021, 1:32 PM EDT
Ramco RamcoRank #462 · 5.4K reputationPosted Jun 20, 2021, 10:02 PM EDT
Farhan AhmedRank #73 · 25K reputationPosted Jun 21, 2021, 1:59 AM EDT