@Handler(supports=Relationship.class, order=50) public class RelationshipValidator extends Object implements org.springframework.validation.Validator
| Constructor and Description |
|---|
RelationshipValidator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
supports(Class<?> c)
Determines if the command object being submitted is a valid type
|
void |
validate(Object target,
org.springframework.validation.Errors errors)
Checks that a given Relationship object is valid.
|
public boolean supports(Class<?> c)
supports in interface org.springframework.validation.ValidatorValidator.supports(java.lang.Class)public void validate(Object target, org.springframework.validation.Errors errors)
validate in interface org.springframework.validation.Validatortarget - Relationship object to be validateerrors - Error object to hold any errors encounter in the testShould fail if end date is prior to the start date
Should fail if start date is a future date
Should pass validation if field lengths are correct
Should fail validation if field lengths are not correctCopyright © 2024 OpenMRS Inc.. All rights reserved.