From: INFO II <in...@ya...> - 2002-01-07 18:01:04
|
Hi, Just a little question regarding "multi-validator" for a specific element. Why my example doesn't work? Here I want to validate first if the "age" is an integer, after I would like to validate the range of value (20-29). I know if I use only the regexp it's enough to do the job, but to do the test of "multi-validator", I have tried this. ======================================================= <formproc:element name="age"> <formproc:validator type="rule"> <rule>org.formproc.example.IsIntRule</rule> <formproc:error lang="en">Valid age must be integer.</formproc:error> </formproc:validator> <formproc:validator type="expression"> <pattern>^(2[0-9])$</pattern> <formproc:error lang="en">Valid age must be between 20-29.</formproc:error> </formproc:validator> <formproc:message lang="en">Valid age required. </formproc:message> </formproc:element> Each validator have been tested separatly and works fine. But together, only the first is tested. Thanks. __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ |