That's the MVC validation kicking in. Do you have data annotations on your model? I'm guessing that the Height
property has [Required]
against it? The attributes are used by the unobtrusive client validation framework. Here is the line within the input helper that adds those tags:
tagBuilder.MergeAttributes(htmlHelper.GetUnobtrusiveValidationAttributes(name, metadata));
The HtmlHelper
has a ClientValidationRuleFactory
, which is initialized in the constructor of HtmlHelper
with, amongst other things, a ClientDataTypeModelValidatorProvider
, which examines the metadata of your model and applies appropriate validation rules in cases of numeric types in your model, for example. If you have client validation enabled and numeric types in your model, e.g. Height
as an int, the helpers will inject unobtrusive client validation into those inputs during render.