I am trying to look for a generic way to validate model data that could be
in different array structure (or shape). For example, the field to be
validated can be in the following 5 cases (and possibly more):

array['ModelName'][0]['field']
array[0]['ModelName'][field']
array['ModelName']['field']
array['ParentModelName']['ModelName']['field']
array['ParentModelName'][0]['ModelName']['field']

Is there a generic way to handle this, or I have to make a if-else condition
to go through all the possible scenarios case by case?

Thanks!
--Lapinski


-- 
View this message in context: 
http://www.nabble.com/Validating-data-from-single-or-multiple-records.-tp26078569p26078569.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to