-
Bug
-
Resolution: Done
-
Major
-
None
-
-
-
-
-
-
https://gitlab.cee.redhat.com/red-hat-jboss-enterprise-application-platform-documentation/eap-documentation/merge_requests/2440, https://gitlab.cee.redhat.com/red-hat-jboss-enterprise-application-platform-documentation/eap-documentation/merge_requests/2719, https://gitlab.cee.redhat.com/red-hat-jboss-enterprise-application-platform-documentation/eap-documentation/merge_requests/2881
After reading through the section 13.6.3.2. Create a Constraint Annotation in Red Hat JBoss Developer Studio (https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/7.0/development-guide/chapter-13-hibernate#create_a_constraint_annotation_in_red_hat_jboss_developer_studio) we concluded that it is pretty much useless.
There's been an incentive to align coding examples with the quickstarts, where possible. I think that if we rewrote this example to be inspired by the example in bean-validation-custom-constraint it would be much better.
Other problems with the current example:
- This example is incomplete, it contains a reference to the CheckCaseValidator class, which is supposed to implement the validation logic, but that class is not shown anywhere.
- There's no explanation of the meaning of this custom constraint. How am I supposed to know what this constraint will be good for?
- I don't think the coding examples need to be tailored to developing with JBDS so much. All this 'click there, then click there' belongs to JBDS documentation, not to a coding example, which should be short and concise and should assume that the user already has some knowledge how to create a class or an enum. I think we can remove the references to JBDS from the example completely and instead of instructions like Select New → Enum. it should rather say "Create a new enum".
So, to sum up:
- Please rewrite the example to be inspired by the bean-validation-custom-constraint quickstart. Note that there will soon be a change in the QS through
JBEAP-5088so please make sure to include the newer version of the AddressValidator class (after the QS change). - Add a note that people should look into the quickstart for more complete information.
- Add a note before the beginning of the example, explaining what this particular custom constraint is good for.
- Don't add any references to JBDS.
- Also please move the section BEHIND 13.6.3.3. Hibernate Validator Constraints because I think it makes more sense to first describe the built-in constraints, and just then describe how to add your own.
- blocks
-
JBEAP-5161 Bean validation related issues in Development guide
- Closed
- clones
-
JBEAP-5096 Improvements for Bean Validation coding example
- Closed