Validation of nested properties with Oval
As per my knowledge Oval Framework do not support validation for nested property using Oval Framework. I spend couple of hours googling, finally found two articles Validation of nested properties with Oval by OnJavaHell and a spring version A better Spring validator for Oval.
These site gave me some light on how to approach this problem. They talk about having custom validators for Oval, which support nested property validation.
Here I am moving one step forward to use Oval Constraints itself for validation. Using this approach we need not use Custom Validators, instead you can make use of the Oval Validators itself. Here is what you have to do.
Step 1: Create a Oval Constraint Annotation ValidateNestedProperty
Step 2: Create the validation class ValidateNestedPropertyCheck
Step 3: Finally Use the annotation for any nested property.
Now you can use the Oval validator like validator.vaidate(person) to perform the validation.
As per my knowledge Oval Framework do not support validation for nested property using Oval Framework. I spend couple of hours googling, finally found two articles Validation of nested properties with Oval by OnJavaHell and a spring version A better Spring validator for Oval.
These site gave me some light on how to approach this problem. They talk about having custom validators for Oval, which support nested property validation.
Here I am moving one step forward to use Oval Constraints itself for validation. Using this approach we need not use Custom Validators, instead you can make use of the Oval Validators itself. Here is what you have to do.
Step 1: Create a Oval Constraint Annotation ValidateNestedProperty
Step 2: Create the validation class ValidateNestedPropertyCheck
Step 3: Finally Use the annotation for any nested property.
Now you can use the Oval validator like validator.vaidate(person) to perform the validation.