0. Introduction I am an old poor beginner and I am very pleased with the help of Java gurus like Marty Hall and his coreservlet page . So while learning his invaluable lessons, I try to give an example. I will cover 3 aspects: Validating by means of Action Controller of a managed bean Using custom validator method with validator attribute Validation through Bean Validation JSR 380 1. Validation using a managed bean action controller In order to display messages, these steps may be needed: A xhtml tag <h:message for="control_to_validate_id"> But it is preferred a <h:messages ..> to put messages at the top of the form Add messages to display by means of java code: FacesMessage errorMessage = new FacesMessage("This an error .."); errorMessage.setSeverity(FacesMessages.SERVERITY_ERROR); FacesContext.getCurrentInstance().addMessage( null , errorMessage); The severity can be: SEVERETY_ERROR (for errors) SEVERETY_INFO (...