-
Notifications
You must be signed in to change notification settings - Fork 47
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
xs:enumeration is not translated correctly to annotations #41
Comments
@asakelliou Are you sure? |
When I had this code (I have transformed the field to enumeration througf jaxb.xjb), when it was validated against a single value (ie "93"), I got 14 validation errors that informed me of wrong pattern, each with the pattern from the list. If you really need the error messages, let me know and I will try re recreate them sometime in the future. |
Hi, Given xsd part :
generated java class part:
xml with: xml with: For the validation I used 'org.hibernate:hibernate-validator:5.2.2.Final' |
This problem affects me as well. I strongly suggest to create a pull request for this, @StefanS |
I am currently on remote location without my dev PC, so I cannot test it and release it, but I will be back in a week or so.. :-) |
Ok, np, thx. |
1.5 released. |
Give the following piece of an xsd :
the translated annotations are :
@Pattern.List({
@pattern(regexp = "12"),
@pattern(regexp = "13"),
@pattern(regexp = "14"),
@pattern(regexp = "15"),
@pattern(regexp = "19"),
@pattern(regexp = "26"),
@pattern(regexp = "35"),
@pattern(regexp = "37"),
@pattern(regexp = "38"),
@pattern(regexp = "39"),
@pattern(regexp = "40"),
@pattern(regexp = "90"),
@pattern(regexp = "91"),
@pattern(regexp = "92"),
@pattern(regexp = "93")
})
Which of course is wrong because the given value must satisfy all the patterns in the list at the same time.
The text was updated successfully, but these errors were encountered: