Re: Form Validation
"Diez B. Roggisch" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
> I just have a question about the process of "Form Validation".If I have
> the following code--- ---this.defineElement( new
> DefaultFormElement(lOG_NAME,FormType.STRING,null,new
> NotNullValidator("Login Name error"),false) );
>
> And I also define a form validator later.When I call
> "form.map().validate(true)" and I didn't fill the "login" field,will the
> validation process stop here? If not,and the ValidationException is also
> thrown in my form validator,will I catch the exception from the
> "NotNullValidator"?
As you wrote yourself: By passing true to validate, the exceptions that occur
in single validators are deferred, so you end up with one exception
containing all exceptions thrown in your formvalidators. Or, to put it
differetn: the validation of subsequent formelements won't stop after one
validator fails.
Diez