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

When saving a string in field expecting URI, Rails error occurs, not ValidUri form error message #567

Open
wickr opened this issue Jul 22, 2019 · 0 comments

Comments

@wickr
Copy link
Member

wickr commented Jul 22, 2019

Describe the bug
#565 cleaned up saving of URIs in form fields, and also introduced ValidUri to validate the values in the form. Saving URIs works as expected, but when I try to save a string, I get a Rails error, and not the nicer error message on the form. Tests got updated to handle this, and I'm not sure how what I'm doing is different exactly.

To Reproduce
Steps to reproduce the behavior:

  1. Edit a Term
  2. In SameAs field, type some text like 'Buxton Hall' (not a URI)
  3. Click 'Update Term'
  4. Rails error: could not make a valid RDF::URI from Buxton Hall

Expected behavior
Error message appears as part of form saying the entered string is not a valid URI.

Screenshots
image

image

Related work
#565

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

No branches or pull requests

1 participant