In many ways, the JSF validation framework follows the example of previous MVC frameworks, such as Struts. The Struts framework introduced an XML-based validation layer that enabled developers to declare validation rules in an XML file, which the framework would then apply to form bean properties during form submission. Struts includes a number of built-in validators to support common scenarios, such as checking for required fields, verifying a numeric value, and validating a credit card number format.
The JSF validation framework also includes a number of built-in validators that can be registered on components in the view, such as the
<f:validateLength> tags. It is important ...