Skip to content

As a dev performing validation, if the validation manifest is invalid then I want to see an appropriate error #33

@craigfowler

Description

@craigfowler

Generally-speaking the object model exposed by the validation manifest makes it quite difficult to create an invalid validator, but it is still possible.

In this case, if a developer tries to use that manifest to perform validation then they should be presented with a ValidationException. The message to that exception should make it clear what about their manifest is invalid.

Implementation plan

I'd like to implement this via validation! I can use built-in validation rules to validate the validation manifest before it is used. If it is invalid, throw an exception with a message that includes the results.

What is an invalid manifest?

I need to perform some investigation to determine exactly what makes a manifest invalid. One thought about this is duplicate validation rules. That is two or more rules upon the same validated object which have identical rule-types and names.

Duplicate rules (multiple validation rules which validate the same validated value, of the same rule type and name) are not permitted. Currently this scenario is not detected and so the validator will attempt to perform the validation regardless.

There are almost certainly further invalid scenarios though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA new feature or capability

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions