2 and 3 are the same except that one uses annotation while another one uses faces-config.xml
1 , 2, 3 uses <f:validator> facelet. When you are using CDI validator, you use binding = "validator name" When you are using validator, you use validatorId="validator id".
4 is different as the bean itself has its own validator method taking FacesContext, UIComponent and Object as arguments.
In the exam, you may be asked to change from case 1 to case 4, or something like that.