Form¶
function onSubmit
¶
Function that will be called on form submit. Should return array with new settings data and errors
Returns
- Array
Result that has contains 2-element array:
[settings: object, errors: object]
with new settings and errors if occurred during submission.
Parameters
Name | Type | Description |
---|---|---|
values |
object |
Submitted settings |
function onValidate
¶
Function that will be called on form validate. If there will be no result, there will be yup validation based on schema. If returns errors, they will be passed to form. Errors should be an object with field names as flat keys and error messages as values.
Returns
- null
| object
Object or null if there are no errors
Parameters
Name | Type | Description |
---|---|---|
values |
object |
Current form values |