Skip to content

1.3.2

Compare
Choose a tag to compare
@pedro-lb pedro-lb released this 01 Jul 16:52
· 172 commits to master since this release

πŸ’… Improvements

  • πŸ’… When mapping initialTouched, formup will now consider the merged initialValues object (that is generated based on the schema + options.initialValues). Each field will be validated, being touched only if:
    • Is truthy
    • Is false (falsy, but represents checkboxes & radio buttons, they're already selected in this case)
    • Is 0 (falsy, but represents number inputs already pre-filled)

This means that any inputs auto-initialized by formup will be touched by default, if the value matches the criteria above.

Some examples are:

0 // touched
false // touched
true // touched
"foo" // touched

"" // not touched
null // not touched
undefined // not touched