At 05:34 PM 8/9/2006, Aleksandar Petrovic wrote:
I'm not 100% sure this is right place to ask this question - but here we go. Forward me in right direction if needed.
I was sure I had seen it years ago - and I was right, it is near the end of the tutorial:
Data::FormValidator::Tutorial which you will find on your friendly local CPAN mirror
John
It is common that you need to make sure user entered same value in two
different fields - like with password fields.
I haven't found something like that in DFV - am I'm missing something?
I could define my own constraint - but I'm not sure if it can receive any
other data except dfv object and value
of the field (I would need to receive value of the other field). So it
would end as something like:
== the profile ==
constraint_methods => {
user_password1 => equals($form->{user_password2}),
user_email1 => email(),
user_email2 => email(),
user_email2 => equals($form->{user_email2}),
}
O and what about providing a way to set the error message to something
like: "Fields xyz and yxz don't have same value".
PS. I know I can check this via JavaScript - but it would be nice to also
have that check on the server side.
--
Aleksandar PetroviÄ?
Webmaster of Techcode.NET
Web: http://www.techcode.net
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.