UsicUserActivationForm.class.php 652 B

1234567891011121314151617181920212223
  1. <?php
  2. class UsicUserActivationForm extends sfForm
  3. {
  4. public function configure()
  5. {
  6. $this->setWidgets(array('code' => new sfWidgetFormInput(array(),array('maxlength' => 50)),
  7. 'login' => new sfWidgetFormInput(array(),array('maxlength' => 20)),
  8. ));
  9. $this->widgetSchema->setNameFormat('activation[%s]');
  10. $this->setValidators(array(
  11. 'code' => new sfValidatorString(array('required' => true, 'trim' => true)),
  12. 'login' => new sfValidatorRegex(array('required' => true, 'pattern' => "/^[a-z][0-9a-z_]*$/"),
  13. array('invalid'=>'login can contain only small latin, numbers, symbol _ and must start with letter')),
  14. ));
  15. }
  16. }
  17. ?>