jquery validator driving license

Solutions on MaxInterview for jquery validator driving license by the best coders in the world

showing results for - "jquery validator driving license"
Eric
28 Oct 2018
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