• Resolved safnasash

    (@safnasash)


    Hello,

    I have simple login form with username and password, i need to add custom error message to password filed instead of default error message: Password is incorrect, please try again.

    I added this code:

    function um_custom_validate_username( $args ) {
    if ( isset( $args[‘user_password’] ) ) {
    UM()->form()->add_error( ‘user_password’, ‘CFA Institution Id is incorrect, Please try again.’ );
    }
    }
    add_action(‘um_submit_form_errors_hook_login’,’um_custom_validate_username’, 10, 1);

    For password there is no validate filed in form settings as in username and other fields.

    Please reply ASAP

    • This topic was modified 1 year, 9 months ago by safnasash.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Login form password filed custom error message’ is closed to new replies.