@Handler(supports=Person.class, order=50) public class PersonValidator extends Object implements org.springframework.validation.Validator
| Constructor and Description |
|---|
PersonValidator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
supports(Class<?> clazz) |
void |
validate(Object target,
org.springframework.validation.Errors errors) |
public boolean supports(Class<?> clazz)
supports in interface org.springframework.validation.Validatorpublic void validate(Object target, org.springframework.validation.Errors errors)
validate in interface org.springframework.validation.ValidatorShould fail validation if birthdate makes patient older than 140 years old
Should fail validation if birthdate is a future date
Should fail validation if deathdate is a future date
Should fail validation if birthdate is after death date
Should fail validation if voidReason is blank when patient is voided
Should fail validation if causeOfDeath and causeOfDeathNonCoded is blank when patient is dead
Should fail validation if causeOfDeath and causeOfDeathNonCoded is both set
Should pass validation if gender is blank for Persons
Should pass validation if field lengths are correct
Should fail validation if field lengths are not correctCopyright © 2024 OpenMRS Inc.. All rights reserved.