/*! * Bundle for jFormVal * http://sites.google.com/site/jformval/ */ jVal = { alert: false, alertAll: false, alertFunction: function(arg) { var msg = ""; for (var i = 0 ; i < arg.length ; i++) { msg += arg [i] + "\n"; } alert(msg); }, caseSensitive: false, style: false }; jVal.lang = function(lang) { jVal.msg = jVal.bundle[lang]; }; //style of the elements on error jVal.errStyle = { 'border': '2px solid #017F40', 'background-color': 'yellow' }; //default style of elements jVal.defStyle = { 'border': '1px solid black', 'background-color': 'white' }; //error messages array jVal.errorMsg; jVal.bundle = { 'pt_br': { '01': 'É necessário escolher uma opção de %name%', '02': 'O campo %name% não deve ser preenchido', '03': 'O campo %name% deve ter no máximo %maxlength% caracteres', '04': 'O campo %name% é obrigatório', '05': 'O campo %name% deve ter no mínimo %minlength% caracteres', '06': 'O campo %name% não pode ser preenchido com este valor', '07': 'É necessário marcar ao menos %mincount% item/s %name%', '08': 'O campo %name% não deve ser marcado', '09': 'Você deve marcar marcar no maximo %maxcount% item/s de %name%' }, 'en_us': { // '01': 'You must choose an option of %name%', '01': 'You must enter a value for %name%', '02': 'The field %name% must not be filled', '03': 'The field %name% cant be longger than %maxlength% characteres', // '04': 'The field %name% is required', '04': 'Please enter a value for %name%', '05': 'The field %name% must have at least %minlength% characteres', // '06': 'The field %name% cant be fiiled with this value', '06': 'Please enter a value for %name%', '07': 'You must choose at least %mincount% items of %name%', '08': 'The field %name% cannot be chosen', '09': 'You must check a maximum of %maxcount% items of %name%', //Phone number validation: '10': 'Please enter a valid value for %name%' } };