Inspired by the Jobeet tutorial I started my own simple test
application.
However, I got an unknown "required" field" and I have no clue where
it comes from.
See screenshot here: http://img85.yfrog.com/i/screenshot20100303at954.png/
Thanks in advance
Trung
schema.yml:
----------------
Member:
actAs: { Timestampable: ~ }
columns:
email: { type: string(255), notnull: true }
password: { type: string(255), notnull: true }
nickname: { type: string(255), notnull: true }
firstname: { type: string(255), notnull: true }
lastname: { type: string(255), notnull: true }
sex: { type: string(255), notnull: true }
age: { type: string(255), notnull: true }
location: { type: string(255), notnull: true }
state: { type: string(255), notnull: true }
preference: { type: string(255), notnull: true }
photo: { type: string(255), notnull: true }
profilemsg: { type: string(4000), notnull: true }
lib/model/doctrine/MemberForm.class.php:
--------------------------------------------------------
class MemberForm extends BaseMemberForm
{
public function configure()
{
unset(
$this['created_at'], $this['updated_at']
);
$this->validatorSchema['email'] = new sfValidatorAnd(array(
$this->validatorSchema['email'],
new sfValidatorEmail(),
));
$this->widgetSchema['password'] = new
sfWidgetFormInputPassword();
$this->validatorSchema['type'] = new sfValidatorChoice(array(
'choices' => array_keys(Doctrine_Core::getTable('member')-
>getStates()),
));
$this->widgetSchema['state'] = new sfWidgetFormChoice(array(
'choices' => Doctrine_Core::getTable('member')-
>getStates(),
'expanded' => false,
'multiple' => false,
));
$this->validatorSchema['sex'] = new sfValidatorChoice(array(
'choices' => array_keys(Doctrine_Core::getTable('member')-
>getSex()),
));
$this->widgetSchema['sex'] = new sfWidgetFormChoice(array(
'choices' => Doctrine_Core::getTable('member')->getSex(),
'expanded' => false,
'multiple' => false,
));
$this->validatorSchema['preference'] = new
sfValidatorChoice(array(
'choices' => array_keys(Doctrine_Core::getTable('member')-
>getSex()),
));
$this->widgetSchema['preference'] = new
sfWidgetFormChoice(array(
'choices' => Doctrine_Core::getTable('member')->getSex(),
'expanded' => false,
'multiple' => false,
));
$this->widgetSchema['photo'] = new
sfWidgetFormInputFile(array(
'label' => 'Profiel Foto',
));
$this->validatorSchema['photo'] = new sfValidatorFile(array(
'required' => true,
'path' => 'web/uploads/members/',
'mime_types' => 'web_images',
));
$this->widgetSchema->setLabels(array(
'Email' => 'E-mail',
'password' => 'Paswoord',
'nickname' => 'Schuilnaam',
'firstname' => 'Voornaam',
'lastname' => 'Achternaam',
'age' => 'Leeftijd',
'sex' => 'Ik ben een',
'preference' => 'Ik zoek een',
'location' => 'Stad',
'state' => 'Provincie',
'photo' => 'Profielfoto',
'profilemsg' => 'Profiel bericht',
));
}
}
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en