- This topic has 1 reply, 2 voices, and was last updated 8 years, 10 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › eMember – Custom validation error messages?
I’d like to customize the messages generated by emember_validator.php:
function __construct() {
$this->fields = array();
$this->addRule(‘user_required’, array(‘rule’ => ‘required’, ‘message’ => EMEMBER_USERNAME_NOT_EMPTY));
$this->addRule(’email_required’, array(‘rule’ => ‘required’, ‘message’ => EMEMBER_EMAIL_NOT_EMPTY));
$this->addRule(’email’, array(‘rule’ => ’email’, ‘message’ => EMEMBER_INVALID_EMAIL));
$this->addRule(‘user_minlength’, array(‘rule’ => ‘minlength’, ‘length’ => 4, ‘message’ => EMEMBER_USERNAME_4_CHARS));
$this->addRule(‘user_unavail’, array(‘rule’ => ‘user_unavail’, ‘message’ => EMEMBER_USER_NAME_TAKEN));
$this->addRule(’email_unavail’, array(‘rule’ => ’email_unavail’, ‘message’ => EMEMBER_EMAIL_TAKEN));
$this->addRule(‘pass_required’, array(‘rule’ => ‘required’, ‘message’ => EMEMBER_PASSWORD_EMPTY));
$this->addRule(‘pass_mismatch’, array(‘rule’ => ‘mismatch’, ‘message’ => ‘Password does’t match!’));
$this->addRule(‘alphanumericunderscore’, array(‘rule’ => ‘alphanumericunderscore’, ‘message’ => EMEMBER_ALPHA_NUMERIC_UNDERSCORE));
$this->addRule(‘user_name’, array(‘rule’ => ‘user_name’, ‘message’ => EMEMBER_USER_NAME_VALIDATION_MESSAGE));
}
Where are these messages stored? I can change it in the code if that’s the solution, but was hoping for a user-editable spot as the person I’m doing the work for knows nothing about code.
The goal of this is to tweak wrong password and invalid user messages on the login page like “Wrong username or password.”
Where are these messages stored?
In the language files.