Validators:
<!-- Combination of rich:beanValidator and a4j:support. This will bind to the hibernate validators for the model and
validate when the field is no longer in focus (onblur). The event could be any supported event.
-->
<rich:ajaxValidator event="onblur" />
<!-- Which is equivalent to -->
<rich:beanValidator>
<a4j:support event="onblur" />
</rich:beanValidator>
<!-- Only work on submit. These should bind to the model and use, for example, the hibernate validators -->
<s:validate />
<rich:beanValidator />
In Java (in a hibernate domain object), you can do something like the following:
@Entity
public class MyObject {
@NotNull
@Length(min = 3, message="This field must be at least {min} characters")
private String str;
// Getters and Setters, etc.
}