It is used to register a bean validator to the component. For validating the bean model, you must set the context parameter in the web deployment descriptor file web.xml.