开发者

Asp.net mvc2: How to add validation rules - A number field is not required but has range limitation?

Asp.net mvc2: How to 开发者_如何学JAVAadd validation rules - A number field is not required but has range limitation?


Use the Range Attribute from DataAnnotations.

[Range(0, 255, ErrorMessage="The number must be between 0 and 255.")]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜