1 $.validator.addMethod("Drive_License", function (value, element) {
2
3 var Tipos_Licenca = ['A', 'A1', 'A2', 'AM', 'B', 'B1', 'BE','C','C1','C1E','D','D1','D1E','DE'];
4 var i = 0;
5
6 var Licencas_Inseridas = value.toUpperCase().split(",");
7
8 while (i < Licencas_Inseridas.length) {
9 if (!Tipos_Licenca.includes(Licencas_Inseridas[i])) {
10 return false;
11 }
12 i++;
13 }
14
15 return true;
16 })
17