Skip to content

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

Description

@wickr

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions