Created
February 17, 2009 18:09
-
-
Save donut/65870 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* sfGuardUserProfile form. | |
* | |
* @package form | |
* @subpackage sfGuardUserProfile | |
* @version SVN: $Id: sfDoctrineFormTemplate.php 6174 2007-11-27 06:22:40Z fabien $ | |
*/ | |
class sfGuardUserProfileForm extends BasesfGuardUserProfileForm | |
{ | |
public function configure () { | |
unset($this['user_id'], $this['created_at'], $this['updated_at']); | |
$this->validatorSchema['first_name'] = new sfValidatorString(array('max_length' => 50)); | |
$this->validatorSchema['last_name'] = new sfValidatorString(array('max_length' => 50)); | |
$this->validatorSchema['email'] = new sfValidatorEmail(array('max_length' => 100, 'required' => false)); | |
$this->validatorSchema['phone'] = new sfValidatorString(array('max_length' => 25, 'required' => false)); | |
$this->validatorSchema['address'] = new sfValidatorString(array('max_length' => 255, 'required' => false)); | |
$this->validatorSchema['city'] = new sfValidatorString(array('max_length' => 255, 'required' => false)); | |
$this->validatorSchema['state'] = new sfValidatorString(array('max_length' => 50, 'required' => false)); | |
$this->valdiatorSchema['zip'] = new sfValidatorString(array('max_length' => 50, 'required' => false)); | |
$widgets = array('first_name', 'last_name', 'email', 'phone', 'address', 'city', 'state', 'zip'); | |
foreach ($widgets as $name => $widget) | |
$this->widgetSchema[$widget]->setAttribute('class', 'text'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment