struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Borislav Sabev <b.sa...@eventsoft.de>
Subject Re: Validation problem
Date Tue, 12 Jul 2005 07:25:42 GMT
Rick Reumann wrote:

>
> if ( errors != null && !errors.isEmpty ) <-- this part can probably be 
> shortened, I was too lazy to figure out what really gets returned if 
> validation passes.. a null or empty ActionErrors?
>

here is part of the code of RequestProcessor, so in both cases the form 
is considered valid
        ActionMessages errors = form.validate(mapping, request);
--->>>        if ((errors == null) || errors.isEmpty()) {
            if (log.isTraceEnabled()) {
                log.trace("  No errors detected, accepting input");
            }
            return (true);
        }

Regards
Borislav


Mime
View raw message