PeachBrackets
PeachBrackets.Annotations
FormFieldAttributes Struct
The HTML form-control attributes that describe how a field behaves rather than what kind it is or what it holds:
readonly/disabled/required, which any kind of control can carry, plus maxlength,
type=password and placeholder, which only a text control can.
public readonly record struct FormFieldAttributes : System.IEquatable<PeachBrackets.Annotations.FormFieldAttributes>
Implements System.IEquatable<FormFieldAttributes>
| Constructors | |
|---|---|
| FormFieldAttributes(bool, bool, bool, bool, Nullable<int>, string) | The HTML form-control attributes that describe how a field behaves rather than what kind it is or what it holds: readonly/disabled/required, which any kind of control can carry, plus maxlength, type=password and placeholder, which only a text control can. |
| Properties | |
|---|---|
| MaxLength | The maxlength attribute as a positive character count, or null when absent or not a positive integer. |
| NoExport | The disabled attribute: HTML excludes a disabled control from form submission. |
| None | An element carrying none of them - every field’s starting point, and what a non-field classifies to. |
| Password | type=password - the value must be echoed unreadably rather than shown. |
| Placeholder | The placeholder attribute, or null when absent or empty. |
| ReadOnly | The readonly attribute, or disabled - a disabled control is not editable either. |
| Required | The required attribute. |