Hi,
I have schema.yml (extract) as follows:
Person:
columns:
id: { type: integer(4), notnull: true, unique: true, primary:
true, autoincrement: true }
name: { type: string(100), notnull: true }
hnr_street: { type: string(200), notnull: true }
suburb: { type: string(50), notnull: true }
city: { type: string(50), notnull: true }
postcode: { type: string(5), notnull: true }
email: { type: string(120) }
organisation_id: { type: integer(4) }
relations:
Organisation: { local: organisation_id, foreignAlias: StaffMemberList }
Organisation:
columns:
id: { type: integer(4), notnull: true, unique: true, primary:
true, autoincrement: true }
name: { type: string(100), notnull: true, unique: true }
primary_address: { type: string(255), notnull: true }
postal_address: { type: string(255), notnull: true }
phone: { type: string(25), notnull: true }
fax: { type: string(25) }
Organisation_id allows for null, because there will be 3 types of
people stored in there with 3 forms attached to it.
In one form, I need to make organisation_id required. What validator
would you recommend. Do I need to use sfValidatorChoice and load all
data from the Organisation table? Or should I check for a number?
Thanks for any help.
Kind Regards,
Jochen
--
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