@Handler(supports=ProviderAttributeType.class, order=50) public class ProviderAttributeTypeValidator extends BaseAttributeTypeValidator<ProviderAttributeType>
ProviderAttributeType
object.Constructor and Description |
---|
ProviderAttributeTypeValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
supports(Class<?> c)
Determines if the command object being submitted is a valid type
|
void |
validate(Object obj,
org.springframework.validation.Errors errors) |
public boolean supports(Class<?> c)
Should pass validation if field lengths are correct
Should fail validation if field lengths are not correct
public void validate(Object obj, org.springframework.validation.Errors errors)
validate
in interface org.springframework.validation.Validator
validate
in class BaseAttributeTypeValidator<ProviderAttributeType>
Should fail validation if name is null
Should fail validation if datatypeClassname is empty
Should fail validation if name already in use
Should pass validation if description is null or empty or whitespace
Should pass validation if all fields are correct
Should pass validation if field lengths are correct
NOTE: the current behaviour of the name is that;- when you create an attribute with a name "test", you cannot
create another one with the same name not until you retire the first one. When you retire "test", you
create a new one with the name "test" since the existing one has been retired.
Copyright © 2024 OpenMRS Inc.. All rights reserved.