Boolean if the FormMessage
should also display a counter for the
remaining letters allowed based on the maxLength
.
This will still be considered false if the maxLength
value is not
provided.
The default value to use for the TextField
or TextArea
one initial
render. If you want to manually change the value to something else after
the initial render, either change the key
for the component containing
this hook, or use the setState
function returned from this hook.
Boolean if the maxLength
prop should not be passed to the TextField
component since it will prevent any additional characters from being
entered in the text field which might feel like weird behavior to some
users. This should really only be used when the counter
option is also
enabled and rendering along with a FormMessage
component.
Boolean if the TextField
or TextArea
will not be rendered along
with a FormMessage
component. This will prevent the aria-describedby
prop from being returned when set to true
.
An optional error icon used in the getErrorIcon option.
A function used to get the error icon to display at the right of the
TextField
or TextArea
. The default behavior will only show an icon when
the error
state is true
and an errorIcon
option has been provided.
A function to get and display an error message based on the TextField
or
TextArea
validity. See defaultGetErrorMessage for the default
implementation details.
An optional help text to display in the FormMessage
component when there
is not an error.
The id for the text field. This is required for accessibility.
A function used to determine if the TextField
or TextArea
is an in
errored state. See defaultIsErrored for the default implementation
details.
An optional function that will be called whenever the error
state is
changed. This can be used for more complex forms to disable
the Submit
button or anything else if any field has an error.
The current theme type.
Describes the validation behavior that should be done when the value within
the TextField
changes. This can either be:
"recommended"
Generated using TypeDoc
@since 2.5.0