Postponed
Project:
Field Based Login
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 May 2018 at 11:53 UTC
Updated:
15 Apr 2022 at 22:30 UTC
Jump to comment: Most recent
While looking up to the code i saw unwanted code.
/**
* Callback function for user_login validator.
*/
function fbl_login_default_validators() {
return array(
'fbl_login_name_validate',
'user_login_name_validate',
'user_login_authenticate_validate',
'user_login_final_validate',
);
}
- - 58 $form['#validate'] = fbl_login_default_validators();
++ 58 array_unshift($form['#validate'], 'fbl_login_name_validate');
instead of redefining the validation array again and again. what you can do is give priority to your custom validation.
that way you don't need one more function to add your custom validator.
Comments
Comment #2
chandu7929 commentedNot able to call other form validate function due to
Please use array_unshift($form['#validate'], 'fbl_login_name_validate');
Comment #3
geoanders commented