Not all built-in EditorTemplates use all DataAnnotations, but they exist when you write your own EditorTemplates that you can use.
The order doesnβt really apply unless you run DisplayForModel or EditorForModel , where it shows several editors for all the properties of the model, so it can arrange the editor accordingly.
If you want to use the Description and Prompt metadata, you can write your own String EditorTemplate:
@model string @Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { @title = ViewData.ModelMetadata.Description, @placeholder = ViewData.ModelMetadata.Watermark})
source share