field-form
field-form copied to clipboard
Fix the validation of array fields with defaultField
async-validator allows undefined array fields containing a defaultField definition, as long as these are not required. Without this fix an error is thrown by calling map() on undefined. Therefore, an additional check is implemented before validating the elements of the array.
A test case is included in this commit.
Thanks for providing this useful piece of sofware!
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/react-component/field-form/Gk5V4WRNc8RGWZCSnukqY1GmUhiE
✅ Preview: https://field-form-git-fork-fknipp-master-react-component.vercel.app