unreal4u/rutverifier-js

This package is abandoned and no longer maintained. No replacement package was suggested.

Javascript version of unreal4u/rutverifier

Installs: 773

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

v1.0.1 2014-03-22 00:33 UTC

This package is auto-updated.

Last update: 2024-07-02 13:45:22 UTC


README

Build Status

rutverifier-js

Credits

This class is made by unreal4u (Camilo Sperberg). unreal4u.com.

About this class

  • Can be used to verify chilean RUT (Rol Ășnico tributario) or RUN (Rol Ășnico nacional). (Difference [spanish])
  • Is a pure JavaScript implementation. Will return true or false depending on whether the given RUT is valid or not.
  • @TODO Will also format the RUT/RUN into the correct format.

Basic usage

<script type="text/javascript" src="dist/rutverifier.min.js">
if (rutVerification('30.686.957-4')) {
    console.log('RUT is valid');
} else {
    console.log('RUT is not valid');
}
</script>
  • Congratulations! That's all you've had to do.

Developing

In order to develop, you'll better off installing Node.js in order to run the automated tests and other stuff as well.

Then execute the following at the root of the project:

npm install

In order to do the JavaScript testing and validation, execute the following at the project's root dir:

grunt

Recommended is to install grunt as a global dependency:

npm install -g grunt-cli

Pending

  • Improvements on formatting RUT
  • PHP class that can read out the minified version of this class
  • Submit to packagist in order to add it as an dependency of unreal4u/rutverifier

Version History

  • 1.0.0 :
    • Initial version

Contact the author