/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


//controllo che il campo sia alfanumerico
jQuery.validator.addMethod("alfanumerico",
    function alfanumerico(value,element){
        try
        {
            //Run some code here
            var regexp = /^[0-9a-zA-Z/-]*$/;
            if(regexp.test(value)){
                return true;
            }else{
                return false;
            }
        }
        catch(err)
        {
          //Handle errors here
          return false;
        }

},"Può essere composto solo da caratteri alfanumerici");