-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validation error when using format property #837
Comments
What does |
7.2 "Implementations MAY add custom format attributes." I am using ajv with react-jsonschema-form 0.51 and the 1.0.0 release breaks my implementation by not allowing that option. |
You can already add widgets for any format you like as part of the registry. |
But not custom formats in the schema correct? Because that will fail validation. For example: I have a schema that includes a format 'markup' for a string to display a markup editor. I should be able to add that custom format to the validator (ajv) so I don't get a validation error. The validator ajv that has been added provides that option so it seems odd that the react-schema-form api would not? |
Ah, righto - thanks :) |
Prerequisites
Description
Introduction of ajv validation prevents form submission when using unknown 'format' property
Steps to Reproduce
https://jsfiddle.net/hdp1kgn6/1/
Add format: "textarea" to description and try and submit form
Expected behavior
I can add custom fields which will format ui based on format property in data and not prevent submission
eg.
Actual behavior
Error on form submission (ajv validation)
Uncaught Error: unknown format "textarea" is used in schema at path "#/properties/description"
Version
1.0.x
You can usually get this information in your
package.json
or in the file URL if you're using the unpkg one.The text was updated successfully, but these errors were encountered: