Skip to content

Instantly share code, notes, and snippets.

@kirkegaard
Created April 6, 2010 09:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kirkegaard/357408 to your computer and use it in GitHub Desktop.
Save kirkegaard/357408 to your computer and use it in GitHub Desktop.
<?php
$passwordConfirmation = new App_Validate_PasswordConfirmation();
$password = $this->addElement('password', 'password', array(
'filters' => array('StringTrim'),
'validators' => array(
$passwordConfirmation,
array('Alnum'),
array('StringLength', false, array(6, 100)),
),
'class' => 'input-text',
'required' => true,
'label' => 'Password',
));
$password_confirm = $this->addElement('password', 'password_confirm', array(
'filters' => array('StringTrim'),
'validators' => array(
$passwordConfirmation,
array('Alnum'),
array('StringLength', false, array(6, 100)),
),
'class' => 'input-text',
'required' => true,
'label' => 'Confirm Password',
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment