| Constructor and Description | 
|---|
| FieldValidator() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | supports(Class<?> c)Returns whether or not this validator supports validating a given class. | 
| void | validate(Object obj,
        org.springframework.validation.Errors errors)Validates the given Field. | 
public boolean supports(Class<?> c)
supports in interface org.springframework.validation.Validatorc - The class to check for support.Validator.supports(java.lang.Class)public void validate(Object obj, org.springframework.validation.Errors errors) throws APIException
validate in interface org.springframework.validation.Validatorobj - The Field to validate.errors - ErrorsAPIExceptionShould fail if field name is null
 Should fail if field name is empty
 Should fail if field name is all whitespace
 Should fail if selectMultiple is null
 Should fail if retired is null
 Should pass if name is ok and fieldType, selectMultiple, and retired are non-null
 Should pass validation if field lengths are correct
 Should fail validation if field lengths are not correct
 should not fail if fieldType is nullCopyright © 2024 OpenMRS Inc.. All rights reserved.