📋 React Hooks for form state management and validation (Web + React Native)
MIT License
Published by bluebill1049 over 5 years ago
watch
APIPublished by bluebill1049 over 5 years ago
not add input listener onBlur modes. (#74)
Support Nested Object model #73
firstName[0]
person[0].numbers[0]
name.first
person.name.first
person[0].firstName
person[0].name.first
Published by bluebill1049 over 5 years ago
Published by bluebill1049 over 5 years ago
Published by bluebill1049 over 5 years ago
formState
https://github.com/bluebill1049/react-hook-form/issues/63
Published by bluebill1049 over 5 years ago
tiggerValidation
Published by bluebill1049 over 5 years ago
triggerValidation
forceValidation
to be falsePublished by bluebill1049 over 5 years ago
trigger
to triggerValidation
and accept the following argument
{
name, // name of the input
value, // value of input
forceValidation = true, // force validation `onSubmit` mode before hide the submit button
}
Published by bluebill1049 over 5 years ago
trigger
you can start to manually trigger and validation for a particular field. eg:<input name="test" ref={register({ required: true }) } />
trigger('test'); // will trigger the validation of the field
validationFields
you can control which fields to validate per pageconst { register } = useForm({
validationFeilds: ['test']
})
Published by bluebill1049 over 5 years ago
errors
type https://github.com/bluebill1049/react-hook-form/issues/45
Published by bluebill1049 over 5 years ago
Published by bluebill1049 over 5 years ago
Published by bluebill1049 over 5 years ago
Published by bluebill1049 over 5 years ago
reset()
error when not found will be silenced and throw a console warning.Published by bluebill1049 over 5 years ago
Published by bluebill1049 over 5 years ago
Published by bluebill1049 over 5 years ago
onSubmit
modePublished by bluebill1049 over 5 years ago
setValue
on radioPublished by bluebill1049 over 5 years ago
getValues()
This method will return what's current values in the form.
Published by bluebill1049 over 5 years ago
fix bug https://github.com/bluebill1049/react-hook-form/issues/36
setError
bug with re-render with error.contains NODE
issue