I know that we can use the Validator class on the client to validate a bean against the declared JPA annotations in the bean. Is is possible, and how can I go about using such validation constrains in a POJO to control entry in HTML template ? If we have a Login.java POJO with username and password fields marked with @NotNull and @Size constraints, is there a way I can pull such information at runtime in the client so that I can make my login HTML form fields to have the required attribute (mapped to @NotNull constraints) and min / max attributes (mapped to @Size constraint)
I need help (where exactly do I look ?), hints, advice and guidance. Thanks.