tags:

views:

47

answers:

1

Hi,

In the context of Spring Webflow 2.0.x......

Is it possible to REMOVE a validation error from within the Spring Errors object during validation? I cant see anything in the API.

i.e.

public class MyValidator implements Validator {
    .......
    public void validate(Object target, Errors errors) {
        MyForm form = (MyForm) target;
        errors.remove(someError); // pseudo code
    }
}
+1  A: 

Looking at the source, it doesn't seem like this is possible. Neither the Errors interface nor any of its implementations provide an API for that.

skaffman
Yeah, as I suspected. Surely there must be some way? (rhetorical)
Lawrence Tierney
@Lawrence: I don't think so. There's no way to control the instantiation of the `Errors` object that I know of.
skaffman