Description
It would be nice if there was a reasonable way to reuse a Validator to do business-logic level validation. Perhaps add a method to the Validator interface:
public boolean isValid(Object object);
For background: I'm building a multi-page wizard that edits a common shared data (stored as an ASO). At the end of the wizard, I need to check that all data from all pages is valid (the user is allowed to jump around in the wizard). I'm finding that I'm re-implementing a lot of validation checks in code, duplicating logic already associated with the fields (in the form of validator strings like "required,minLength=5").
What would be nice would be to have an easy way to re-run the validations, just to generate a boolean. At the core of this is combining the current value for the component (possibly extracted right out of the business object) with the list of validators.