hi,

I need to create custom validation function for this module. tried the method in drupal but didnt work.

function my_validate($form, &$form_state)
{
$uc = strtoupper($form_state['values']['account']['first_name']);
if ($form_state['values']['account']['first_name'] !=$uc ) 
   form_set_error('first_name', t('First Name should be in CAPS!'));
}

and also don't know where to call the function.?

tried this $form['#validate'][] = 'my_validate'; but no luck :-|

can anyone help me..

still my old posts are unanswered!.
every time i get slow responses here or can say NO repsonses!! .

Comments

nirmal_george’s picture

You can use validation API for validate all type of form in drupal6.
http://drupal.org/project/validation_api

otherwise use hook_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) ;

madhusudan’s picture

thanks nirmal_george for fast reply :-).

tried that plugin.

but thats for only admins. but i am looking for non-admins (like account request).

any idea..?