(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": "* Campo obbligatorio",
            "alertTextCheckboxMultiple": "* Selezionare un'opzione",
            "alertTextCheckboxe": "* Campo di selezione obbligatorio"
         },
            "length": {
               "regex": "none",
               "alertText": "* Fra ",
               "alertText2": " e ",
               "alertText3": " caratteri permessi"
            },
            "maxCheckbox": {
               "regex": "none",
               "alertText": "* Superato limite dei controlli"
            },
            "minCheckbox": {
               "regex": "none",
               "alertText": "* Selezionare almeno",
               "alertText2": " opzione "
            },
            "confirm": {
               "regex": "none",
               "alertText": "* Il campo non combacia"
            },
            "telephone": {
               "regex": "/^[0-9\-\(\)\ ]+$/",
               "alertText": "* Numero di telefono errato"
            },
            "email": {
               "regex": "/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+\.[a-zA-Z0-9]{2,4}$/",
               "alertText": "* Indirizzo email errato"

            },
            "date": {
               "regex": "/^[0-9]{1,2}[/][0-9]{1,2}[/][0-9]{4}$/",
               "alertText": "* Formato data errato. Formato: GG/MM/AAAA"
            },
            "onlyNumber": {
               "regex": "/^[0-9\ ]+$/",
               "alertText": "* Solo numeri"
            },
            "noSpecialCaracters": {
               "regex": "/^[0-9a-zA-Z]+$/",
               "alertText": "* Nessun carattere speciale permesso"
            },
            "ajaxUser": {
               "file": "validateUser.php",
               "extraData": "name=eric",
               "alertTextOk": "* This user is available",
               "alertTextLoad": "* Loading, please wait",
               "alertText": "* This user is already taken"
            },
            "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": "* Letters only"
            },
            "validate2fields": {
               "nname": "validate2fields",
               "alertText": "* You must have a firstname and a lastname"
            }
         }

      }
   }
})(jQuery);

$(document).ready(function () {
   $.validationEngineLanguage.newLang()
});


