Metadata Validation add error message

The metadata validation using the Regular Expression works pretty good, but has some room for improvement.

For example, if the pattern does not match, a generic error “Metadata type validation error; The input string does not match the pattern.”

There is no indication to the user of what field is throwing the validation error. Would it be possible to pass another argument in the Regular expression validator. For example:

pattern: ^[0-9]{7}$
error_message: "Employee ID Must be 7 digits"
2 Likes

We have a similar item in the roadmap. The main reason it has not been merged is that the metadata app is undergoing a complete rewrite to bridge the gap between upstream Mayan EDMS and the metadata feature set of other major forks. Once the rewrite and the remaining design decisions are made we will merge support for custom validation error messages.

Makes sense, looking forward to it. Really appreciate it.

1 Like