简体   繁体   中英

Spring - remove a validation error?

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.

ie

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM