Method AddValidationAttributes
| Improve this Doc View SourceAddValidationAttributes(ViewContext, Column, IDictionary<String, String>)
Adds validation-related HTML attributes to the attributes
if client validation is
enabled.
Declaration
protected abstract void AddValidationAttributes(ViewContext viewContext, Column column, IDictionary<string, string> attributes)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Mvc.Rendering.ViewContext | viewContext | A Microsoft.AspNetCore.Mvc.Rendering.ViewContext instance for the current scope. |
Column | column | The Column. |
System.Collections.Generic.IDictionary<System.String, System.String> | attributes | The System.Collections.Generic.Dictionary`2 to receive the validation attributes. Maps the validation attribute names to their System.String values. Values must be HTML encoded before they are written to an HTML document or response. |
Remarks
Adds nothing to attributes
if client-side validation is disabled.