ControlledVocabularyManager icon indicating copy to clipboard operation
ControlledVocabularyManager copied to clipboard

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

Open wickr opened this issue 5 years ago • 0 comments

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

wickr avatar Jul 22 '19 22:07 wickr