Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment #1
nirmal_george CreditAttribution: nirmal_george commentedYou 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) ;
Comment #2
madhusudan CreditAttribution: madhusudan commentedthanks 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..?