Skip to content

Instantly share code, notes, and snippets.

View marcelomunozr's full-sized avatar

Marcelo Muñoz Rodriguez marcelomunozr

View GitHub Profile
@javiertapia
javiertapia / jquery.validate.rut.js
Created February 16, 2009 14:03
Validar rut mediante jQuery.Validate
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;