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

Validation messages should be set in the form options #605

Closed
iGormilhit opened this issue Nov 7, 2019 · 0 comments
Closed

Validation messages should be set in the form options #605

iGormilhit opened this issue Nov 7, 2019 · 0 comments
Assignees
Labels
f: editor Concerns editor based on JSON schema AND custom editor f: professional ui Professional interface

Comments

@iGormilhit
Copy link

Describe the issue
validationMessage that are not described in the form options but in the JSON schema won't be displayed in the editor. This behaviour changed from json-schema-form to angular6-jsonschema-form library.
⚠️ Please check all schemas and form options.

To Reproduce
Steps to reproduce the behavior:

  1. As a librarian, create or edit a patron.
  2. In the phone field, hit the a key (for example).
  3. See the error validation message which is the pattern.
  4. Compare to https://github.com/rero/rero-ils/blob/master/rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json#L82

Expected behavior
The validation message should be displayed. In order to do that, add the following in the patron form options:

"validationMessage": {
    "pattern": "Phone number with the international prefix, without spaces, ie +41221234567."
}

Software version
ils.test.rero.ch, v0.5.1

ilsdev.test.rero.ch, 9aa529c

@iGormilhit iGormilhit added f: editor Concerns editor based on JSON schema AND custom editor f: professional ui Professional interface labels Nov 7, 2019
@zannkukai zannkukai self-assigned this Dec 11, 2019
zannkukai added a commit to zannkukai/rero-ils that referenced this issue Dec 12, 2019
* Moves 'validationMessages' strings from resource schemas to corresponding JSON form schema
* Closes rero#605

Co-Authored-by: Renaud Michotte <[email protected]>
zannkukai added a commit to zannkukai/rero-ils that referenced this issue Dec 16, 2019
* Moves 'validationMessages' strings from resource schemas to corresponding JSON form schema
* Closes rero#605

Co-Authored-by: Renaud Michotte <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: editor Concerns editor based on JSON schema AND custom editor f: professional ui Professional interface
Projects
None yet
Development

No branches or pull requests

2 participants