Hi List, I'm having a hard time with the new validation framework when it comes to global (post) validators.
I want to check a constraint that involves three fields: active, catchall, domain. The constraint is that if the active field is true, the other two fields have to be a valid foreign key in another relation (there has to be a row with the two values as as primary key). I thought of something like this: new sfValidatorOr( new sfValidatorChoice(array('choices'=>array(false)), /* for active column*/ new sfValidatorPropelChoice(...) ) There are two problems I can't solve: 1. There seems to be no way two name the field a validator should be applied to (e.g. sfValidatorPropelChoice should be applied to the field active) 2. the sfValidatorPropelChoice can't deal with more than one column (and i also can't name the fields). In principle I'm wondering: 1. How to compare a field in a global validator to a static value? 2. How to validate a compound foreign key (more than one column)? Thanks in advance, Fabian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---