Go to Google Groups Home    doctrine-svn
Re: [Doctrine] #1652: New constant 'Doctrine::VALIDATE_USER'

Doctrine <no-re...@phpdoctrine.org>

#1652: New constant 'Doctrine::VALIDATE_USER'
--------------------------+------------------------------------------------ -
  Reporter:  floriank     |       Owner:  jwage                
      Type:  enhancement  |      Status:  new                  
  Priority:  minor        |   Milestone:  1.1.0                
 Component:  Attributes   |     Version:  1.1-DEV              
Resolution:               |    Keywords:  validation          
  Has_test:  1            |    Mystatus:  Pending Core Response
 Has_patch:  1            |  
--------------------------+------------------------------------------------ -
Comment (by floriank):

 Replying to [comment:1 romanb]:
 > I dont remember the constant names right now.
 It is
 {{{
 Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_VALIDATE,
 Doctrine::VALIDATE_ALL &
 ~Doctrine::VALIDATE_LENGTHS &
 ~Doctrine::VALIDATE_CONSTRAINTS &
 ~Doctrine::VALIDATE_TYPES);

 }}}

 I want to disable all validation except the validate()-method of the
 Records, which is not possible because the code above is the same as

 {{{
 Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_VALIDATE,
 Doctrine::VALIDATE_NONE);
 }}}

 what results in a static return of true in Record->isValid().

--
Ticket URL: <http://trac.doctrine-project.org/ticket/1652#comment:2>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper