This is the simplest of all of the validated compoenents, as it replaces FwInput
. Essentially, this component is
designed to be used for the simplest data entry - just simple strings. Included with this textfield, however, is it will validate
and display the error messages automatically on invalid data. Also, because of the nature of this component, it does not extend
any other input component, so the ONLY options avaiable to it are those listed in this documentation (ie even if the option is valid on FwInput
, if its not listed, it isn't available). Here is the basic usage:
<FwValidatedTextField @model={{model}} @valuePath="name" @label="Name" @update={{action (mut model.name)}} />
disabled
BooleanThis boolean will determine if the text area is usable. A disabled textarea will display the value, but be unable to be edited. For more information click here
helpText
StringThis is the text that will display in place of the error message if there is no error message to show (if there is an error message, that will trump this message)
infoText
StringThis is the message displayed in the FwInfoIcon
directly after the label. (this info icon will be before whatever content is in the afterLabel property)
label
StringLabel is the words that are displayed as a label right before the textfield. Because of this property, there is no need to define a label before the component in your code.
maxCount
NumberSets the limit of how many characters are allowed to be typed. Whichever of maxlength or maxCount is greater will determine the actual limit, but the count will display as negative and red if maxlength is surpassed.
Default: 3000
placeholder
StringPlaceholder is the placeholder of the input. It displays inside the textfield whenever the text area is empty. For more information click here.
showCount
BooleanIf true, number of characters remaining will appear below the textarea, on the right.
Default: true
type
StringThis is the many different types of inputs that there are. For a list of valid input types, click here. While it is hypothetically feasible to use any of these types with this component, this component is usually used only for textfields, so much further testing would be necessary before using it for any other input type.
Default: 'text'