How can I change JQuery Validation plugin that gives error message at browser\'s language. I mean if I run it on a browser that has English language errors will be in Englis
Here's a suggestion for a simple way to set your custom validation message:
1. Create a js file with XX_Messages.ee.js name with syntax:
LANG = {
PERSONAL_BIRTHDAY_CAN_T_BLANK : 'Birthday cannot be left blank',
PERSONAL_COUNTRY_CAN_T_BLANK : 'Country cannot be left blank',
PERSONAL_CITY_CAN_T_BLANK : 'City cannot be left blank',
.......
TEAM_EMAIL_NOT_VALID : 'E-mail is not a valid email address'
};
2.
....
....
Note: import your XX_Messages.ee.js in html head where you want validation
3.
messages: {
gender: {
required: LANG.PERSONAL_BIRTHDAY_CAN_T_BLANK
},
firstName: {
required: LANG.PERSONAL_CITY_CAN_T_BLANK
},
lastName: {
required: LANG.PERSONAL_COUNTRY_CAN_T_BLANK
}
}
Note: XX_Messages.ee.js
file must be import in head of your html before your validation js.