Answers for "jquery validator driving license"

1

jquery validator driving license

$.validator.addMethod("Drive_License", function (value, element) {

            var Tipos_Licenca = ['A', 'A1', 'A2', 'AM', 'B', 'B1', 'BE','C','C1','C1E','D','D1','D1E','DE'];
            var i = 0;

            var Licencas_Inseridas = value.toUpperCase().split(",");

            while (i < Licencas_Inseridas.length) {
                if (!Tipos_Licenca.includes(Licencas_Inseridas[i])) {
                    return false;
                }
                i++;
            }

            return true;
        })
Posted by: Guest on November-10-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language