UsicGroupForm.class.php 502 B

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