Customise - Login / Register / Reset Password - Validation Messages

Support MB User Profile Customise - Login / Register / Reset Password - Validation MessagesResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44224
    CodogCodog
    Participant

    Hi there,
    I have created a custom 'Registration Form' & 'Login Form' & 'Password Reset Form' using your available filter hooks for these forms and all works well.

    However, it is not clear to me how to customise the default primary 'error and success' messages for certain conditions?

    Example #1
    ===========

    On the 'Password Reset' form if a user "clicks" "Get New Password" and the field is empty the default primary error message is "Please enter a username or email address."

    * I do not get my users to add a username on registration (I use email as username). Therefore I would like this error message to say "Please enter your email address."

    Example #2
    ===========

    On successful user registration (using the 'rwmb_profile_register_fields' filter hook) the form is removed and a success message is shown. This works fine, but again I wish to customise the message that is shown. How can this be done. "Remote validation" method?

    Some guidance or example would be helpful.

    Many Thanks 🙂

    #44238
    PeterPeter
    Moderator

    Hello,

    Those messages are hardcoded in the plugin source. There aren't any filter hooks to change the messages. For example, the message "Please enter a username or email address" is located in the file
    /mb-user-profile/src/Forms/Login.php line 118.
    You can try to use a translation plugin to translate the message into your language.

    #44241
    CodogCodog
    Participant

    Ok, thanks for the info Peter 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.