Skip to content
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

Customizable Validation Messages #854

Closed
sdirix opened this issue Feb 5, 2018 · 3 comments
Closed

Customizable Validation Messages #854

sdirix opened this issue Feb 5, 2018 · 3 comments

Comments

@sdirix
Copy link
Member

sdirix commented Feb 5, 2018

  • Within the array control there is a summary of validation errors. However since the messages are local to each control the summary does not make much sense. See screenshot below from array control example of jsonforms.io:
    validationsummary
  • Enum values are rendered as drop boxes. Therefore the validation message should be equal to one of the allowed values seems strange. See screenshot below from Rule example of jsonforms.io:
    image
@edgarmueller
Copy link
Contributor

edgarmueller commented Apr 3, 2018

ajv seems to supports customizable error message via ajv-errors, although it seems a bit strange that the error message is placed within the schema itself. For our uses case, I'd rather place it in UI schema and then do some kind of pre-processing/transformation of the schema for ajv. We need to pay attentation how this will integrate with i18n (which perhaps also needs to re-work) and #923.

@edgarmueller edgarmueller changed the title Improve Validation Messages (Array/Enum Control) Customizable Validation Messages Apr 3, 2018
@edgarmueller edgarmueller modified the milestones: 2.1.0, next Apr 3, 2018
@edgarmueller edgarmueller modified the milestones: 2.1.0, Backlog Nov 19, 2018
@sdirix
Copy link
Member Author

sdirix commented Nov 8, 2022

Error messages can now be customized via the new i18n support in JSON Forms 3.0.

@sdirix sdirix closed this as completed Nov 8, 2022
@sdirix sdirix removed this from the Backlog milestone Nov 8, 2022
@harsh-ayasya
Copy link

I tried doing whatever you have mentioned @sdirix but still its not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants