@Handler(supports=PersonName.class, order=50) public class PersonNameValidator extends Object implements org.springframework.validation.Validator
Constructor and Description |
---|
PersonNameValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
supports(Class c) |
void |
validate(Object object,
org.springframework.validation.Errors errors)
Checks whether person name has all required values, and whether values are proper length
|
void |
validatePersonName(PersonName personName,
org.springframework.validation.Errors errors,
boolean arrayInd,
boolean testInd)
Checks that the given
PersonName is valid |
public boolean supports(Class c)
supports
in interface org.springframework.validation.Validator
Validator.supports(java.lang.Class)
public void validate(Object object, org.springframework.validation.Errors errors)
validate
in interface org.springframework.validation.Validator
personName
- errors
- public void validatePersonName(PersonName personName, org.springframework.validation.Errors errors, boolean arrayInd, boolean testInd)
PersonName
is validpersonName
- the PersonName
to validateerrors
- arrayInd
- indicates whether or not a names[0] array needs to be prepended to fieldCopyright © 2018 OpenMRS LLC.. All Rights Reserved.