Active
Project:
LDAP provisioning
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Jan 2010 at 11:33 UTC
Updated:
21 Jan 2010 at 12:37 UTC
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 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 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..?