'verufy' => array(
'rule' => array('identicalFields', 'password'),
'message' => 'Passwords must match'
)
after the validate array have this:
/*function to make sure that 2 entered fields are identical*/
function identicalFields( $field=array(), $compare_field=null )
{
foreach( $field as $key => $value )
{
$vi = $value;
$v2 = $this->data[$this->name][$compare_field];
if ($vi !== $v2)
{
return false;
}
else
{
continue;
}
}
return true;
}
On Jan 31, 2008 8:53 PM, Darren884 <[EMAIL PROTECTED]> wrote:
>
> have a registration form and I am trying to make it so the user
> verified his password
>
> I have this:
> var $validate = array(
> 'username' => VALID_NOT_EMPTY,
> 'password' => VALID_NOT_EMPTY,
> 'verify' => VALID_NOT_EMPTY,
> 'email' => VALID_EMAIL,
> 'website' => VALID_NOT_EMPTY
> );
>
> How would I make it so 'verify' has to be the same value as password?
> Thanks.
>
> >
>
--
In the name of Life, Liberty, and the pursuit of my sanity.
Siebren Bakker(Aevum Decessus)
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d- s+: a19 C++++ UL++ P L++
!E W++ N(-) o? K? w(+) O? M-- V?
PS+ PE Y- PGP- t+ 5? X- R tv--
b++ Di D+ G+ e h! r y-
------END GEEK CODE BLOCK------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---