Guest User

Untitled

a guest
Nov 18th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. ## Default_Form_Password.php
  2.  
  3. public function init()
  4. {
  5. $this->setName("password");
  6. $this->setMethod('post');
  7.  
  8. $this->addElement(
  9. 'password', 'password', array(
  10. 'filters' => array('StringTrim'),
  11. 'description' => '8 characters minimum',
  12. 'validators' => array(
  13. array('StringLength', false, array(8, 40)),
  14. ),
  15. 'required' => true,
  16. 'label' => 'Password:',
  17. )
  18. );
  19.  
  20. $this->addElement(
  21. 'password', 'password_confirm', array(
  22. 'validators' => array(
  23. array(
  24. 'identical', false, array('token' => 'password')
  25. )
  26. ),
  27. 'label' => 'Confirm password:',
  28. )
  29. );
Add Comment
Please, Sign In to add comment