Validation rule and message for Registration

12 years 2 months ago #192126 by yusukenishihara
Validation rule and message for Registration was created by yusukenishihara
Dear Support

Regarding CB registration form, When users type non-valid email address or too short password...etc, "Not valid" message will be shown like;

Please enter a valid email address.

Please enter at least 6 characters.


I have 2 questions about this;

1. Can I change the validation rules?; disable email check or change to allow 2 words password...

2. Which file or code Can I find these "Not valid" messages to change the messages?

Regards

Please Log in to join the conversation.

12 years 2 months ago #192175 by krileon

1. Can I change the validation rules?; disable email check or change to allow 2 words password...

Yes, edit the password field within CB > Field Management.

2. Which file or code Can I find these "Not valid" messages to change the messages?

Believe we use the Joomla language string for invalid passwords and if not defined we define it within CBs language files, which you can find at the below path.

components/com_comprofiler/plugin/language/


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 2 months ago #192224 by yusukenishihara
Replied by yusukenishihara on topic Re: Validation rule and message for Registration
Thank you for your quick reply.

krileon wrote:

1. Can I change the validation rules?; disable email check or change to allow 2 words password...

Yes, edit the password field within CB > Field Management.

2. Which file or code Can I find these "Not valid" messages to change the messages?

Believe we use the Joomla language string for invalid passwords and if not defined we define it within CBs language files, which you can find at the below path.

components/com_comprofiler/plugin/language/


I have changed the messages of codes both on Joomla Core Language file "default_language.php" and CB language file "en-GB.ini" but the message on registration form was not changed.

Here are the source code regarding validation shown on my registration form FYI;

$.extend(jQuery.validator.messages, {
required: "This field is required.",
remote: "Please fix this field.",
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
accept: "Please enter a value with a valid extension.",
maxlength: $.validator.format("Please enter no more than {0} characters."),
minlength: $.validator.format("Please enter at least {0} characters."),
rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
range: $.validator.format("Please enter a value between {0} and {1}."),
max: $.validator.format("Please enter a value less than or equal to {0}."),
min: $.validator.format("Please enter a value greater than or equal to {0}.")
});

Please Log in to join the conversation.

12 years 2 months ago #192275 by krileon
If you have GroupJive (2.0-2.4) installed and its language plugin is also installed then it also redefines those exact same language strings. This causes GJs language file to override whatever you changed in CBs language files. Please check if you've GJ and its language plugin installed and if so please ensure you also translate it there (or install GJ 2.5 and its language plugin).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.242 seconds

Facebook Twitter LinkedIn