DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10782>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10782 If two fields are required, and one has a mask, the mask is not checked if the other field is blank ------- Additional Comments From [EMAIL PROTECTED] 2002-07-14 03:53 ------- There have been a number of bugs posted against Validator.java (including one by me), so I thought I'd take a crack at fixing it. As written, all the VAs were run against the fields if the field had a dependency, except that a VA wasn't run if it had a failed dependency itself. Unfortunately, that meant that if field A depended on "required", and field B dependended on "required, mask", B's "mask" would never be run if field A was blank, even if field B wasn't blank. There were some other similar problems. Anyway, I refactored it as follows: The top level iterates over the fields. Each field then has it's dependencies run (and the depencies of the dependencies recursively, etc...) At the first failure, the ValidatorResult that failed is added to the master results list, and the main loop moves on to the next field. I think things are a bit easier to follow in the source now, and the main validate() isn't so huge, but that's just my preferences. Could someone take a peek and let me know if you see any obvious problems, and commit it if it's OK? Thanks, James -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>