Latest0.0.1
Homepagehttps://github.com/renatomoya/RMRUTValidator
LicenseMIT
Platformsios 5.0, osx 10.7, requires ARC
Authors

Say Thanks

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

Requirements

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

Installation

Manual

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

Cocoapods

Create the Porfile file in your XCode project root directory with the following:

platform :ios, '5.0'

pod 'RMRUTValidator'

Then run:

pod install

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"]

Latest podspec

{
    "name": "RMRUTValidator",
    "version": "0.0.1",
    "summary": "Simple class to validate chilean security number, also known as RUT.",
    "homepage": "https://github.com/renatomoya/RMRUTValidator",
    "license": "MIT",
    "authors": {
        "Renato Moya": "[email protected]"
    },
    "platforms": {
        "ios": "5.0",
        "osx": "10.7"
    },
    "source": {
        "git": "https://github.com/renatomoya/RMRUTValidator.git",
        "tag": "0.0.1"
    },
    "source_files": "RMRUTValidator/Classes/0.0.1/RMRUTValidator.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This