commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eickvonder Bjoern" <Eickvonder.Bjo...@inside-online.de>
Subject [validator] [patch] Validating all indexed properties with different messages
Date Thu, 16 Nov 2006 08:25:35 GMT
Hi,

I got a patch that might be slightly related to https://issues.apache.org/jira/browse/VALIDATOR-116.
It addresses the following two problems.

1.) If an indexed field is validated the validation terminates on the first index failing.
My patch makes this configurable within the field element via an attribute "stopOnFail". If
this is false just the validation for the current index is terminated if a dependency validation
fails. If it is true (Default) there is no change in behaviour.

2.) In VALIDATOR-116 it is said that a major problem with indexed fields is that you can't
get different error messages. My patch makes this possible by allowing a back-reference token
"[]" (as used internally for the key of the field) to be used within msg keys, arg keys and
var values. In case of an indexed property these are replaced by [0],[1],[2],... during the
iteration over all the indexes of the validated field.

By the way, should I have (or should I still) opened an "Improvement" within Jira for this
or has it been correct to first post this patch here?

Björn Eickvonder

Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, 
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. 
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail bzw. Inhalte 
hieraus ist nicht gestattet.


Mime
View raw message