Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more schemas to validate against (rjsf-team#1130)
* Add more schemas to validate against * Edit validate.js so that it calls addMetaSchema conditionally * Add props which accepts custom schemas for ajv * remove unnecesary fallback * rename variable name * add documentation for `metaSchema` prop * Update docs/validation.md Co-Authored-By: aerfio <[email protected]> * Update src/validate.js Co-Authored-By: aerfio <[email protected]> * Update src/validate.js Co-Authored-By: aerfio <[email protected]> * Update docs/validation.md Co-Authored-By: aerfio <[email protected]> * Update docs/validation.md Co-Authored-By: aerfio <[email protected]> * Update docs/validation.md Co-Authored-By: aerfio <[email protected]> * return errors from validation in validateFormData * add initial tests for meta schemas * add one proper test case * add more test cases * Update docs/validation.md Co-Authored-By: aerfio <[email protected]> * Add test cases for multiple metaSchemas in validateFormData * Change prop name and update docs * Change additionalMetaSchemas prop to array only and remove console.error * make sure that validateFormData's additionalMetaShemas argument is always an array * Commit "broken" test to see whether they pass * Fix tests and create new Ajv instance when additionalMetaSchemas changes * fix: create new ajv instance when additionalMetaSchemas prop is null, add tests * handle validation errors * fix tests and delete validation errors * Delete unneeded field in return statement * dont stop showing red overlay when validation errors are present * Make errors and test more sensible * rename variable * handle only $schema related errors * fix tests
- Loading branch information