Re: [QUICKFORM] Javascript validation of two fields or more...

From: Date: Sun, 24 Aug 2003 16:55:06 +0000
Subject: Re: [QUICKFORM] Javascript validation of two fields or more...
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7383@lists.php.net to get a copy of this message
<carlesgp@yahoo.es> wrote : > Hi, > > I have two password fields in a form (one for the password an the other to > confirm it). > I'm trying to register in Quickform a javascript validation function that > compares the two fields, but i can't achieve it. It seems like registerRule > only accepts javascript functions that treat with a single field of the > form. > > Can anybody help me? Yes, it only works with a single field. But you can still probably access the other field value if you hardcode the object path: form.element.x or if you set the rule for a group. This feature will maybe be added later as we have just modified the way validation is done in QuickForm and this might allow more possibilities. > Another question: Can I register javascripts functions via addFormRule? No. Good luck, Bertrand Mansion Mamasam

« previous php.pear.general (#7383) next »