Skip to content

ConstraintPredicate message() overrides violatedValue #500

Description

@Witko

Hello,
first of all thanks for a great lib, it ticks a lot of requirements/ideas I'd have for a java validation framework.
Using it I found some obstacles and complexities. One of them is the way ConstraintPredicate works - mainly the overrides:
If you override the message it overrides the behavior of the ViolatedValue.
For example the CollectionConstraint.containsAll returns missing values as violated value. If you override message this behavior is reverted to the base ConstraintPredicate behavior of returning the target.
So in this case you have inconsistent behavior of the validation framework.

It would be great to allow for more control of the ConstraintPredicate to customize the behavior if needed. But at least it would be great to remove the anonymous implementations for overrides that are clashing.

I use version 0.16.0

Thank you!
Viliam

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions