Skip to main content

FormField

Examples#

import { Select, Input, FormField } from 'tailor-ui';

Use validationMessage with Input#

Error Message
Error Message

Use validationMessage with controlled props#


Use validationMessage with Select#

Error Message

Use yup validator with Input#

this is a required field

use function validator with Input#

Use function of array validator with Input#

API#

PropertyDescriptionTypeDefault
labelThe label of fieldstring
requiredShow the * after the field labelbooleanfalse
validatorvalidator can be function / object array / yup schema, see above examples to learn how to use itValidator
validationMessagedisplay message on fieldReactNode