drupal_100
asked on
drupal form additional validate function
In user_login_block, I add an additional field CN (customer number), and I want to add an additional validate function for it.
$form['#validate'][] = 'additional_validate';
When I do this way, sometimes if I input the correct CN value, and incorrect password, it can pass and login with the
incorrect password there.
array_unshift($form['#vali date'], 'additional_validate');
When I do this way, it works well.
Given correct CN value, it will validate password and not login on incorrect password.
I often like to use $form['#validate'][] way.
Is there something incorrect here to use this way?
$form['#validate'][] = 'additional_validate';
When I do this way, sometimes if I input the correct CN value, and incorrect password, it can pass and login with the
incorrect password there.
array_unshift($form['#vali
When I do this way, it works well.
Given correct CN value, it will validate password and not login on incorrect password.
I often like to use $form['#validate'][] way.
Is there something incorrect here to use this way?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.