How to customize the source code error message for the particular section.

For this we need to modify the error message for the required section and for rest leave same as like that by adding condition.

	_.extend(GlobalViewsMessageView.prototype, {
						getContext: _.wrap(GlobalViewsMessageView.prototype.getContext, function (fn) {
							var context = fn.apply(this, _.toArray(arguments).slice(1));

							// Modify the context only for the login/register page
							var loginElement = document.querySelector('.login-register-login-submit');
							if(loginElement){
							
								context.message = "Incorrect email or password. Please correct your email and password."
							}
							else{
								console.log('error');
							}

							return context;
						})
					});

Modified error message

source code error message

Leave a comment

Your email address will not be published. Required fields are marked *