Symfony: how would you reverse the "notnull:true" in a schema of a plugin?

Posted by user248959 on Stack Overflow See other posts from Stack Overflow or by user248959
Published on 2010-04-01T15:08:54Z Indexed on 2010/04/01 15:13 UTC
Read the original article Hit count: 149

Filed under:
|
|

Hi,

sfGuardUser model of sfDoctrineGuardPlugin is defined this way:

sfGuardUser:
  actAs: [Timestampable]
  columns:
    id:
      type: integer(4)
      primary: true
      autoincrement: true
    username:
      type: string(128)
      notnull: true
      unique: true

As you can see 'username' has the feature "notnull:true". Now i want to create a register form that is not using 'username' but the email address of the user.

When a user wants to register, it is showed this:

Validation failed in class sfGuardUser 1 field had validation error: * 1 validator failed on username (notnull)

Any idea?

Javi

© Stack Overflow or respective owner

Related posts about symfony

Related posts about yaml