@Handler(supports=PersonName.class, order=50) public class PersonNameValidator extends java.lang.Object implements org.springframework.validation.Validator
Constructor and Description |
---|
PersonNameValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
supports(java.lang.Class c) |
void |
validate(java.lang.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(java.lang.Class c)
supports
in interface org.springframework.validation.Validator
Validator.supports(java.lang.Class)
public void validate(java.lang.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 Inc.. All Rights Reserved.