阅读背景:

MVC数据注释范围验证无法正常工作

来源:互联网 

I have a RangeValidator on a property in my model to only allow Integers that are between 0 and 100. I have a partial view that displays a form to update the property via a jQuery UI dialog. I have looked at the source and can confirm that the data annotation attributes are being generated properly. However, the validatation isn't working properly. It does perform some kind of validation, but it isn't using the range I'm setting. The values 1, 10, and 100 do not produce the error. Any other single or two digit value produces the error. However, if I pad with zeros, all values less than one hundred are fine. on a property in my mod




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: