3 Jun
2005
3 Jun
'05
12:54 p.m.
a) Easier value checking.
In _validate we would then build the form a second time to check that all the fields still have the type and value they are supposed to have.
foreach ($form_elements as $name => $value) { switch($value['type']) { case 'textfield': if (!is_string($edit['value'])) { form_set_error(...); } if (is_empty($edit['value']) && $value['required']) { form_set_error(...); } break; case 'textarea': .... } }
Who does the validation? Core, or the module? How would that work for a form outside of the node forms? ... The direction sounds good so far.