Skip to content

jQuery plugin to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya).

Notifications You must be signed in to change notification settings

picandocodigo/ci.jquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jQuery CI Validator

jQuery plugin to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya).

This plugin will validate a text input's content as a Uruguayan CI number. It will add 'valid' or 'invalid' classes to an input. Check out example.html to see how it works or see below:

Usage:

<style>
  input.valid{
    background: #9deb91;
  }
  input.invalid{
    background: #eb91ae;
  }
</style>

<input type="text" name="ci" id="ci"/>

<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="./ci.jquery.js"></script>
<script type="text/javascript">
  $("#ci").keyup(function(){
    $("#ci").validate_ci(); // adds 'valid' or 'invalid' classes to the input on keyup
  });
</script>

About

jQuery plugin to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya).

Resources

Stars

Watchers

Forks

Packages

No packages published