@Handler(supports=Form.class, order=50) public class FormValidator extends Object implements org.springframework.validation.Validator
| Constructor and Description | 
|---|
| FormValidator() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | supports(Class<?> c)Determines if the command object being submitted is a valid type | 
| void | validate(Object obj,
        org.springframework.validation.Errors errors)Checks the form object for any inconsistencies/errors | 
public boolean supports(Class<?> c)
supports in interface org.springframework.validation.ValidatorValidator.supports(java.lang.Class)public void validate(Object obj, org.springframework.validation.Errors errors)
validate in interface org.springframework.validation.ValidatorShould fail validation if name is null
 Should fail validation if version is null
 Should fail validation if version does not match regex
 Should fail validation if retiredReason is null
 Should fail validation if retiredReason is empty
 Should pass validation if all fields are correct
 Should pass validation if field lengths are correct
 Should fail validation if field lengths are not correctCopyright © 2024 OpenMRS Inc.. All rights reserved.