RMRUTValidator 0.0.1

RMRUTValidator 0.0.1

LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.

  • By
  • Renato Moya

Simple class to validate chilean security number, also known as RUT.


This class works fine with iOS >= 5.0 and OS X >= 10.7 applications (ARC required, of course).



Download and add RMRUTValidator.h and RMRUTValidator.m files to your XCode project.

How to use?

Import the RMRUTValidator.h file where you need to use it.

#import "RMRUTValidator.h"

Then you validate a RUT like this:

if ([RMRUTValidator validateRut:@"19.200.923-5"]) {
  // Yay, the Rut is valid.
} else {
  // The rut is invalid. :(

Dots and hyphen are stripped from the RUT string by default so, the following formats are all valid:

[RMRUTValidator validateRut:@"19.200.923-5"]
[RMRUTValidator validateRut:@"19200923-5"]
[RMRUTValidator validateRut:@"192009235"]