✨ Feature: support multiple errors for single field (#430)
useForm({ validateCriteriaMode: 'all' })
<input name="test" ref={register({ required: true, minLength: 10, pattern: /\d+/gi })} />
all validation errors will display together when both valiation failed.
✨ Feature/array of checkboxes (#500) Thanks to @ldanet ❤️
<input name="test" type="checkbox" value="a" />
<input name="test" type="checkbox" value="b" />
Finally, we can support checkbox with same name, check both values will return ['a', 'b']
🔨 validate function return type to removed void (This solve problem for error message due to type void)
validate: value => { }; // you need to return string or boolean ❌
validate: value => { return false; } ✅
🐞 close #516 make sure watch return consistent default value (#517)
🐞 close #513 fix trigger validate error message ()
🐞 close reset bug with onChange ()
🔦 clean up types ()
🥂 Reset accepts partial FormValues ()
✂️ remove API validationFields ()
optional argument will no longer be supported and use instead