asp.net mvc 4 - Validation for numeric but not equal to 0 in MVC4 -


i want use dataannotations in mvc4 valid value numeric greater 0, please help.

thanks.

you use [range] attribute:

[range(1, int.maxvalue, errormessage = "the value must greater 0")] public int value { get; set; } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -