#5831: Able to use error keys and error messages in controller. Dinstinguish 
error
per field.
------------------------+---------------------------------------------------
    Reporter:  jmut     |          Type:  Enhancement
      Status:  new      |      Priority:  Medium     
   Milestone:  1.2.x.x  |     Component:  Validation 
     Version:  RC2      |      Severity:  Normal     
    Keywords:           |   Php_version:  n/a        
Cake_version:           |  
------------------------+---------------------------------------------------
 Currently all that gets into validationErrors array is already translated
 messages per field.
 I think with cake 1.2 introducing chain(multi) validation per field it is
 important to be able to distinguish validation errors per field. This adds
 more flexibility and allows for adittional logic besides just displaying
 messages.

 Possible solutions:
 1. validationErrors property holds key = > message  in there. This doesn't
 seem to portable though.
 2. add hook in view that is possible to pass error messages through custom
 function (e.g for translation). That way you don't set messages in
 $validation and validationErrors ends up with error keys only. If those
 keys not needed in controller  you don't have to  explicitly set the
 messages in the view but it will automaticlly get translated via the hook
 __('someKey');

 Of course I am only week familiar with cake so there might be better
 solutions than that.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/5831>
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to