@Handler(supports=PersonAddress.class, order=50) public class PersonAddressValidator extends Object implements org.springframework.validation.Validator
| Constructor and Description | 
|---|
| PersonAddressValidator() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | supports(Class<?> c) | 
| void | validate(Object object,
        org.springframework.validation.Errors errors) | 
public boolean supports(Class<?> c)
supports in interface org.springframework.validation.ValidatorValidator.supports(java.lang.Class)public void validate(Object object, org.springframework.validation.Errors errors)
validate in interface org.springframework.validation.ValidatorShould pass if all the dates are valid
 Should fail if the startDate is in the future
 Should fail if the endDate is before the startDate
 Should pass if startDate and endDate are both null
 Should pass if startDate is null
 Should pass if endDate is null
 Should fail if required fields are empty
 Should pass if required fields are not empty
 Should pass validation if field lengths are correct
 Should fail validation if field lengths are not correctCopyright © 2024 OpenMRS Inc.. All rights reserved.