|Constructor and Description|
|Modifier and Type||Method and Description|
Returns whether or not this validator supports validating a given class.
Validates the given Provider.
public boolean supports(Class<?> c)
c- The class to check for support.
public void validate(Object obj, org.springframework.validation.Errors errors) throws APIException
obj- The encounter to validate.
Should be valid if identifier is not set Should be valid if identifier is set Should be invalid if provider is retired and the retired reason is not mentioned Should be invalid if person is not set Should be valid if only person is set Should reject a provider if it has fewer than min occurs of an attribute Should reject a provider if it has more than max occurs of an attribute Should accept duplicate identifier if the existing provider is not retired Should accept duplicate identifier if the existing provider is retired Should accept a duplicate identifier for a new provider which is not retired Should accept a duplicate identifier for a new provider which is retired Should pass validation if field lengths are correct Should fail validation if field lengths are not correct
Copyright © 2021 OpenMRS Inc.. All rights reserved.