Bean validation VS JSF validation
- by henloke
When facing the problem of validating a property in a JSF2 application there are two main approaches.
Defining the validation on the ManagedBean using an Annotation
@ManagedBean
public class MyBean {
@Size(max=8)
private String s;
// Getters setters and other stuff.
}
or declaring it on the jsf page:
<h:inputText…