I am completely stuck and cannot figure out what I am doing wrong.
I have created a custom Upload behaviour but I cannot get the
following validation rule to work.
Just after the setup function in the behaviour I call this function
_create_validation_rule(&$model){} which sets the validation rules,
for my suprise nothing happens. When I call the function from inside
the beforeValidate function it works, but Cake display the following
error:
Warning (2): preg_match() expects parameter 2 to be string, array
given [CORE\cake\libs\validation.php, line 877]
When I checked the validation.php and pr ( ) the second paramenter it
showed the file array:
Array
(
[filename] => Array
(
[name] =>
[type] =>
[tmp_name] =>
[error] => 4
[size] => 0
)
)
I must be doing something wrong somewhere, just don't know where and
how to fix it.
Any help would very much appreciated.
Many thanks in advance.
Cheerss
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment