Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 554 Bytes

password.md

File metadata and controls

16 lines (11 loc) · 554 Bytes

Password Fields

If you need to collect a password then you can use the [DataType] attribute in System.ComponentModel.DataAnnotations to annotate that a string model property is in fact a password, e.g.:

[DataType(DataType.Password)]
public string PasswordField { get; set; }

Default HTML

When using the Default Field Generator then the default HTML of the Field Element will be:

<input %validationAttrs% %htmlAttributes% id="%propertyName%" name="%propertyName%" type="password" value="%value%" />