@Handler(supports=TaskDefinition.class, order=50) public class SchedulerFormValidator extends Object implements org.springframework.validation.Validator
Constructor and Description |
---|
SchedulerFormValidator() |
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)
Checks the form object for any inconsistencies/errors
|
public boolean supports(Class<?> c)
supports
in interface org.springframework.validation.Validator
Validator.supports(java.lang.Class)
public void validate(Object obj, org.springframework.validation.Errors errors)
validate
in interface org.springframework.validation.Validator
Should fail validation if name is null or empty or whitespace
Should fail validation if taskClass is empty or whitespace
Should fail validation if repeatInterval is null or empty or whitespace
Should fail validation if class is not instance of Task
Should fail validation if class is not accessible
Should fail validation if class cannot be instantiated
Should fail validation if class not found
Should pass validation if all required fields have proper values
Should pass validation if field lengths are correct
Should fail validation if field lengths are not correct
Copyright © 2024 OpenMRS Inc.. All rights reserved.