我有MaskedTextBox
:
<div style="direction:ltr;padding-left:20px;">
@(Html.Kendo().MaskedTextBox()
.Name("nationalityCode")
.Mask("000000000000").HtmlAttributes(new { @class = "login-input user-pass", width = "300px", placeholder = "Enter you code" })
)
</div>
我的问题是EthnicCode可以是8或12长度,如果我使用上面的代码,那么在运行时输入一个长度为8的代码,它会将null传递给控制器。