In My model I use
[Display(Name ="No Of Children")]
public Nullable<int> NoOFChildren { get; set; }
And in my view I use
<div class="col-lg-6">
@Html.EditorFor(model => model.NoOFChildren, new { htmlAttributes = new { @class = "form-control", placeholder = "No Of Children" } })
</div>
When I run the page it will show textbox like following image
I want to restrict this textbox to accept number less than zero. When number is zero the down arrow should be disable. How I can do that?
jQuery validation may be one option but I don’t want to use that until and unless no alternative is valuable. Is there any DataAnotation validation attributes is there that can do it or any HTML5 elements that may do it automatically without writing additional scripts?