Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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..?