Skip to content

validation error is not helpful in identifying the problem #4652

@swirtSJW

Description

@swirtSJW

Current Behavior

In some situations, dkan can issue an error that offers little to go on in fixing the issue when trying to save a dataset.
"The attribute must match exactly one of the subschemas."

The error prevents save and since all the fields highlight in red, it is impossible to figure out which of the fields is the problem

error message with no directive given on how to fix it.

Expected Behavior

An error should be as clear as possible about what the error is and what item needs to be adjusted.

Example: The frequency attribute must match exactly one of the following allowed values [a, b, c, d].

Steps To Reproduce

  1. Edit a dataset and change one of the values to something that is not allowed by the schema.
  2. Try to save the node.
  3. See the error appear and all the fields light up red.
  4. Scratch head trying to guess at the problem.

Relevant log output (optional)

Anything else?

It is possible this message may come from a third party validation library and may not be able to be resolved in DKAN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions