#2563: [PATCH][TEST] Form helper should be able to set class parameter to 
required
for fields from multiple models
----------------------------------------------------+-----------------------
    Reporter:  biesbjerg                            |         Owner:  mark_story
        Type:  Enhancement                          |        Status:  new       
    Priority:  Low                                  |     Milestone:  1.3.x.x   
   Component:  Helpers                              |       Version:            
    Severity:  Trivial                              |    Resolution:            
    Keywords:  formHelper class required biesbjerg  |   Php_version:  PHP 5     
Cake_version:                                       |  
----------------------------------------------------+-----------------------
Comment (by Dieter_be):

 One thing I just noticed with alanics patch is that the required class is
 not set for password fields that use validation: $model needs to be set,
 so in the beginning of the input() function, it will check if the field ==
 'password' and if so set the type immediately without needing to
 instantiate a $model.

 So what i did is just copy the `$model =&
 ClassRegistry::getObject($this->model());` from the default branch and
 also put it in the password branch.  Like this the required check gets
 also done on password fields.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/2563#comment:10>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to