Ok - I know xD I must use: sfGenExtraPlugin - http://www.symfony-project.org/plugins/sfGenExtraPlugin - constantValidatorSchemaCompare
I don't know why "the sfValidatorSchemaCompare class allows you to have validation comparing 2 fields, but does not allow comparing a field to a constant value." and I must install plugin. On 8 Maj, 09:41, dziobacz <[email protected]> wrote: > Value of field username must be != 'admin' and 'administrator'. Is it > possible to do using some validator ? > > I have tried: > new sfValidatorSchemaCompare('username', > sfValidatorSchemaCompare::NOT_EQUAL, > "admin", array(), array('invalid' => 'Error.')), > > but it doesn't work because "admin" isn't field but value :/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
