Hi Derrek,

I found the answer to this question by digging through the documentation.
 Based on the docs, symfony's default configuration settings don't enable
all of Doctrine's validations.  So you need to change the default
configuration.  I changed my system's configuration by adding the following
code to lib/config/PropertyConfiguration.class.php:

public function configureDoctrine(Doctrine_Manager $manager)
  {
    $manager->setAttribute(Doctrine_Core::ATTR_VALIDATE,
Doctrine_Core::VALIDATE_ALL);
  }

I added this code, rebuilt the models/forms/filters and cleared the cache.
 After that, all custom validations worked fine.

Hope this helps!

David



On Mon, Sep 20, 2010 at 9:46 AM, Derrek <dle...@allofzero.com> wrote:

>
> Did you find the answer to this? I'm having the same problem.
>
> On Sep 15, 8:53 pm, David Park <dpark...@gmail.com> wrote:
> > Hi All,
> >
> > I'm having problems creating a custom Doctrine data validation rule.
> > After reading the Doctrine "More Validation" documentation (
> http://www.doctrine-project.org/documentation/manual/1_2/hu/component-overvi...
> ),
> > I created a protected validate() function in my model class file
> > Game.class.php.  When I update a record, however, the Game.validate()
> > record doesn't get called at all.
> >
> > Can anyone give me advice on how to get the custom validation to
> > work?  Any advice would be appreciated as I'm a newbie!
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to