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
JSON Schema support - 'format' keyword is not taken into account #3892
Comments
Thanks for making the new ticket. It's clear what you were needing! So currently I believe the format keyword is not or fully supported. There is however a map function that can be passed to the json schema parser where you can generically add things on to the field based on config. Internal projects I maintain do this until I can find the time to add the format validation to formly. |
Thanks a lot for your reply. I'll see what I can do on my side in the meantime. Maybe I'll be able to dynamically change
to something like
I think JSON SCHEMA support is an important feature, because it makes Formly compatible with a standard. note FYI, I added a like towards JSON Schema documentation in the issue description: |
Hi, Maybe I did a mistake on my side... I just changed my Java backend code from
to
and generated JSON is now correct: there is now a
And now generated Form is checking the email! Formly is working fine 😄 I suggest we put this issue on hold. Thanks again for this great piece of software and for your time 👍 |
Description
JSON Schema 'format' keyword seems not to be honored by Formly.
Minimal Reproduction
I am using https://github.com/victools/jsonschema-generator/blob/main/slate-docs/source/includes/_javax-validation-module.md to generate JSON Schema on server side.
Formly is able to render most of it, but the 'format' keyword seems not to be honored.
Example:
This Java class
leads to this (generated) JSON schema.
(more precisely, a JSON object containing both the schema and the model)
Formly handles most of it, except:
which is not checked / taken into account.
(as you can see it on screenshot: no error messages near "email" )
Any idea on how I can make this work?
Environment
Additional context
Schema and model here belong to a PoC project to test Formly and jsonschema-generator all together.
Having these 2 working fine together would be great!!
The text was updated successfully, but these errors were encountered: