Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcelo Muñoz Rodriguez marcelomunozr

View GitHub Profile
@javiertapia
javiertapia / jquery.validate.rut.js
Created Feb 16, 2009
Validar rut mediante jQuery.Validate
View jquery.validate.rut.js
function validaRut(campo){
if ( campo.length == 0 ){ return false; }
if ( campo.length < 8 ){ return false; }
campo = campo.replace('-','')
campo = campo.replace(/\./g,'')
var suma = 0;
var caracteres = "1234567890kK";
var contador = 0;