Active
Project:
Validation API
Version:
6.x-1.0
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2009 at 15:08 UTC
Updated:
25 Jul 2009 at 15:08 UTC
The line that assigns the $value variable:
$value = (is_array($element['#value']) ? $element['#value']['value'] : $element['#value']);
doesn't allow for some CCK types such as the email field, which stores values with the ['email'] key rather than ['value'], e.g. $node->field_email[0]['email'].
I suggest replacing the above line with:
$value = (is_array($element['#value']) ? array_shift($element['#value']) : $element['#value']);
Tim