You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Ricardo Giacomin <ri...@uol.com.br> on 2003/05/13 23:47:29 UTC

[Validators] stopping on first error

Hi all,

I looked at the Validator.validateField() method and saw that it stops the
validation process at the time the first problem occurs (see the excerpt
below). Is this desired? Is it possible to have all dependencies checked?

<snip>
while (st.hasMoreTokens())
{
    String depend = st.nextToken().trim();
    ValidatorAction depAction = (ValidatorAction)hActions.get(depend);
    <snip>
    boolean good =validateFieldForRule(field, depAction, results, hActions,
pos);
    allResults.merge(results);
    if (!good) return;
}
<snip>