Closed (fixed)
Project:
Form API Validation
Version:
7.x-1.1
Component:
Miscellaneous
Priority:
Major
Category:
Feature request
Assigned:
Reporter:
Created:
26 Jul 2012 at 13:28 UTC
Updated:
10 Dec 2012 at 05:10 UTC
I want to check that 2 email fields are equals.
How i can pass two variables (from two different fields) in the validation function?
Is it possible??
I try this
if ($value == $form_state['values']['contatto_email']) {
return TRUE;
} else {
return FALSE;
}
Comments
Comment #1
pedrofaria commentedHmmm what do you think to turn this request into a feature?
Maybe some thing like:
We can create the rule match_field.
Ideas?
Comment #2
pedrofaria commentedWill be available on next release.
Comment #3
barrapontoCheck both http://api.drupal.org/api/drupal/includes%21form.inc/function/form_proce... and http://api.drupal.org/api/drupal/includes%21form.inc/function/password_c...
Since we're changing stuff during #process, we can replicate some this magic. I'm pretty sure there's a "confirm field" element in contrib, somewhere.
Comment #4.0
(not verified) commentedAdd code example