Documentation of react-hook-form-material-ui
import { Form } from 'react-hook-form-material-ui'
onSubmit : function (optional) : () => {}
This function will receive the form data if form validation is successful.
Refer to handleSubmit (react-hook-form)
parameters : object (optional) : {}
This object allows to pass all parameters to the form's hook.
Refer to useForm (react-hook-form)
name : string (required)
The name of the field in the form.
RegisterOptions : object (optional) : {}
This object allows to pass all options to the register.
Refer to register (react-hook-form)
ErrorMessages : object (optional) : {}
This object can be used to predefine all error messages.
Inheritance
While not explicitly documented above, the props of the AbstractFieldProps component are also available on this component.
import { Checkbox } from 'react-hook-form-material-ui'
formControlProps : object (optional) : {}
This object allows to pass all properties to the FormControl.
Refer to FormControl (material-ui)
import { Collection } from 'react-hook-form-material-ui'
name : string (required)
The name of the array of fields in the form.
fieldsRender : function (required)
This function allows to customize the rendering of fields.
buttonsRender : function (required)
This function allows to customize the rendering of buttons.
Inheritance
While not explicitly documented above, the props of the AbstractFieldProps component are also available on this component.
import { RadioGroup } from 'react-hook-form-material-ui'
formControlProps : object (optional) : {}
This object allows to pass all properties to the FormControl.
Refer to FormControl (material-ui)
radioGroupProps : object (optional) : {}
This object allows to pass all properties to the RadioGroup.
Refer to RadioGroup (material-ui)
options : array (optional) : []
An array with the available choices.
example:
[
{ control: <Radio value="first_choice" />, label: "First choice" },
{ control: <Radio value="second_choice" />, label: "Second choice" },
]
Inheritance
While not explicitly documented above, the props of the AbstractFieldProps component are also available on this component.
import { Select } from 'react-hook-form-material-ui'
formControlProps : object (optional) : {}
This object allows to pass all properties to the FormControl.
Refer to FormControl (material-ui)
selectProps : object (optional) : {}
This object allows to pass all properties to the Select.
Refer to Select (material-ui)
Inheritance
While not explicitly documented above, the props of the AbstractFieldProps component are also available on this component.
import { Slider } from 'react-hook-form-material-ui'
formControlProps : object (optional) : {}
This object allows to pass all properties to the FormControl.
Refer to FormControl (material-ui)
sliderProps : object (optional) : {}
This object allows to pass all properties to the Slider.
Refer to Slider (material-ui)
Inheritance
While not explicitly documented above, the props of the AbstractFieldProps component are also available on this component.
import { Switch } from 'react-hook-form-material-ui'
formControlProps : object (optional) : {}
This object allows to pass all properties to the FormControl.
Refer to FormControl (material-ui)
switchProps : object (optional) : {}
This object allows to pass all properties to the Switch.
Refer to Switch (material-ui)
Inheritance
While not explicitly documented above, the props of the AbstractFieldProps component are also available on this component.
import { TextField } from 'react-hook-form-material-ui'
textFieldProps : object (optional) : {}
This object allows to pass all properties to the TextField.
Refer to TextField (material-ui)
Inheritance
While not explicitly documented above, the props of the TextField component are also available on this component.
import { EmailTextField } from 'react-hook-form-material-ui'
Inheritance
While not explicitly documented above, the props of the TextField component are also available on this component.
import { PasswordTextField } from 'react-hook-form-material-ui'
passwordDifficulty : string : {}
Choose a password difficulty between:
- "complex": The password must be have one uppercase, one lowercase, one digit and one special character.
- "basic": The password must be have one uppercase, one lowercase, and one digit.
- "simplest": The password must be have one uppercase and one lowercase.
- null: No checks will be performed by default.
Refer to FormControl (material-ui)
Inheritance
While not explicitly documented above, the props of the TextField component are also available on this component.
import { UrlTextField } from 'react-hook-form-material-ui'