-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
constraint mappings specified in META-INF/validation.xml aren't applied #5531
Comments
I am not sure that violation.xml is even supported. |
I can see that the file it is hot reloaded 45f875b#diff-b325242f07b81465b410fd3c1e40914aL78 but we are not trying to parse it anywhere. Let's wait for @gsmet to give his thoughts. |
Right now, we only support annotations in Quarkus. It should probably be documented if it's not already. I'm still unsure if we should implement more of the logic in Quarkus or if we should move all this discovery to HV somehow. |
I found a partial work around. The rules specified in validation.xml are applied if i create a dummy class that extends the class I'm trying to validate. But validation cascading doesn't work.
The fields within the owner class aren't validated. |
A corresponding Hibernate Validator issue: https://hibernate.atlassian.net/browse/HV-2031 |
Hibernate's Validator implementation fails to catch any violation. I've got all of my validation rules specified in an XML ( because I do not have access to the source code ).
In my service I'm trying to validate the object
@Inject
Validator validator;
...
Set<ConstraintViolation> violations = validator.validate( myOrg );
if( ! violations.isEmpty() ) return false;
The violation set is always empty. I've tried my configuration using a standalone implementation
of hibernate-validator and it works.
The text was updated successfully, but these errors were encountered: