Skip to content

Permit rule validations to return modified paths. #12

@armstnp

Description

@armstnp

One of the major use cases for the rule validation is for handling compound cases, e.g. comparing multiple key-values of a hash in a single condition. In cases like those, it often makes sense to bind any validation failures to one of the child keys being examined, instead of to the hash as a whole.

As such, it may make sense for this validation in particular to be able to return a modified path that will be attached to a failure.

This may be dependent on #6 in order to minimize chance of these features colliding. It may even be feasible to mutate the 'smart context' somehow in order to specify the modified path, but it would be best to wait until it's determined whether the 'smart context' will be immutable or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions