#1524: Possibility to add validators
-----------------------------------+----------------------------------------
 Reporter:  hwestphal              |       Owner:  jwage
     Type:  enhancement            |      Status:  new  
 Priority:  minor                  |   Milestone:       
Component:  Validators             |     Version:  1.0.2
 Keywords:                         |    Has_test:  0    
 Mystatus:  Pending Core Response  |   Has_patch:  1    
-----------------------------------+----------------------------------------
 When creating models from a schema.yml file you have the option to add
 several validators:

 {{{
 Contact:
   tableName: contact
   columns:
     name:
       type: string(255)
       notblank: true
     email:
       type: string(255)
       email: true
   attributes:
     validate: true
 }}}

 But if you want to add a custom validator doctrine will not know it and an
 exception is thrown like:

 ''Invalid schema element named "customvalidator" at path
 "Contact->columns->customfield"''

 I attached a patch which will add a static function to the Doctrine_Lib
 class called "registerValidators" to solve this problem.

 With this patch we can call
 Doctrine_Lib::registerValidators('customvalidator') or
 Doctrine_Lib::registerValidators(array('customvalidator',
 'customvalidator2')).
 Afterwards the build task will complete without throwing an exception.

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1524>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" 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.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to