forked from SimplesIP/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.8 KiB
66 lines
2.8 KiB
2 years ago
|
|
||
|
|
||
|
(function ($) {
|
||
|
$.fn.validationEngineLanguage = function () {};
|
||
|
$.validationEngineLanguage = {
|
||
|
newLang: function () {
|
||
|
$.validationEngineLanguage.allRules = {"required": {// Add your regex rules here, you can take telephone as an example
|
||
|
"regex": "none",
|
||
|
"alertText": "* O campo e requerido",
|
||
|
"alertTextCheckboxMultiple": "* Selecione uma opcao",
|
||
|
"alertTextCheckboxe": "* Este checkbox e requerido"},
|
||
|
"length": {
|
||
|
"regex": "none",
|
||
|
"alertText": "*Entre ",
|
||
|
"alertText2": " e ",
|
||
|
"alertText3": " caracteres"},
|
||
|
"maxCheckbox": {
|
||
|
"regex": "none",
|
||
|
"alertText": "* Quantidade de checks excedido"},
|
||
|
"minCheckbox": {
|
||
|
"regex": "none",
|
||
|
"alertText": "* Selecione uma das opcoes ",
|
||
|
"alertText2": " options"},
|
||
|
"confirm": {
|
||
|
"regex": "none",
|
||
|
"alertText": "* Your field is not matching"},
|
||
|
"telephone": {
|
||
|
"regex": "/^[0-9\-\(\)\ ]+$/",
|
||
|
"alertText": "* Telefone Invalido"},
|
||
|
"email": {
|
||
|
"regex": "/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/",
|
||
|
"alertText": "* E-mail Invalido"},
|
||
|
"date": {
|
||
|
"regex": "/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/",
|
||
|
"alertText": "* Data Invalida, desve estar no formato DD/MM/YYYY"},
|
||
|
"onlyNumber": {
|
||
|
"regex": "/^[0-9\ ]+$/",
|
||
|
"alertText": "* Somente Numeros"},
|
||
|
"noSpecialCaracters": {
|
||
|
"regex": "/^[0-9a-zA-Z]+$/",
|
||
|
"alertText": "* Sem caracteres especiais"},
|
||
|
"ajaxFila": {
|
||
|
"file": "valida.php?tipo=fila",
|
||
|
"extraData": "",
|
||
|
"alertTextOk": "* FILA DISPONIVEL",
|
||
|
"alertTextLoad": "* Carregando filas",
|
||
|
"alertText": "* Fila Indisponivel"},
|
||
|
"ajaxName": {
|
||
|
"file": "validateUser.php",
|
||
|
"alertText": "* This name is already taken",
|
||
|
"alertTextOk": "* This name is available",
|
||
|
"alertTextLoad": "* Loading, please wait"},
|
||
|
"onlyLetter": {
|
||
|
"regex": "/^[a-zA-Z\ \']+$/",
|
||
|
"alertText": "* Somente Letras"},
|
||
|
"onlyNumberChars": {
|
||
|
"regex": "/^[0-9\*\#\ ]+$/",
|
||
|
"alertText": "* Somente Numeros,*# "}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
})(jQuery);
|
||
|
|
||
|
$(document).ready(function () {
|
||
|
$.validationEngineLanguage.newLang()
|
||
|
});
|