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

properties of schema array/items do not respect property specs regarding element type #4306

Open
stefan-korn opened this issue Oct 4, 2024 · 0 comments · May be fixed by #4307
Open

properties of schema array/items do not respect property specs regarding element type #4306

stefan-korn opened this issue Oct 4, 2024 · 0 comments · May be fixed by #4307
Assignees
Labels

Comments

@stefan-korn
Copy link
Contributor

stefan-korn commented Oct 4, 2024

Current Behavior

Some property specs in the schema bring up special form element types in the JSON form widget.

For example:
specifying property spec "format" with a value of "uri", changes the input type to "url" instead of default type textfield (text).

This is done in the StringHelper class.

This mechanism does not apply to property of array/items elements in the schema. These properties will be textfield (text) regardless of property spec.

Expected Behavior

Same validation behavior as with single value properties by changing the form element type.

Steps To Reproduce

  • Create a dataset
  • add a "Related document"
  • enter an invalid URL for the "Related Document" like "test"
  • Save dataset
  • You will notice a validation error message "The attribute should match 'uri' format." All fields in the form are marked red, so you do not know which field is affected.
  • This contrasts to entering a invalid URL in the "Data Dictionary" field. Here the validation error will mark the affected field with corresponding message (HTML5 validation I suppose).

Relevant log output (optional)

No response

Anything else?

No response

@stefan-korn stefan-korn added the bug label Oct 4, 2024
stefan-korn added a commit to stefan-korn/dkan that referenced this issue Oct 4, 2024
stefan-korn added a commit to stefan-korn/dkan that referenced this issue Oct 7, 2024
stefan-korn added a commit to stefan-korn/dkan that referenced this issue Oct 7, 2024
@dafeder dafeder self-assigned this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants