MaxLength Attribute not generating client-side validation attributes

前端 未结 11 540
北荒
北荒 2020-11-30 02:41

I have a curious problem with ASP.NET MVC3 client-side validation. I have the following class:

public class Instrument : BaseObject
{
    public int Id { get         


        
11条回答
  •  遥遥无期
    2020-11-30 03:23

    In MVC 4 If you want maxlenght in input type text ? You can !

    @Html.TextBoxFor(model => model.Item3.ADR_ZIP, new { @class = "gui-input ui-oblig", @maxlength = "5" })
    

提交回复
热议问题