Hi Team,
[Range(1, 1000, ErrorMessage = "Enter a valid 4 digit number")]
public decimal Amount { get; set; }
I have applied Range for amount where it is accepting amount as excepted, But If I add any special charater it is throwing 500 internal server instead of ErrorMessage = "Enter a valid 4 digit number"
please help me to validate this amount field where it can through an error if I pass any special charater
Sachin SinghPosted Sep 14, 2021, 11:47 AM
Sowmya SirsiPosted Sep 14, 2021, 11:38 AM
It is giving me 500 internal server error instead of error what I had set.
If I pass "amount " : 300@
it should through Enter a valid 4 digit number
Instead I am getting 500 error
Sachin SinghPosted Sep 14, 2021, 10:15 AM
Sowmya SirsiPosted Sep 14, 2021, 10:10 AM
Sachin SinghPosted Sep 14, 2021, 9:29 AM