Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (23 sloc) 0.807 kb
//
// US2ConditionRegex.h
// US2FormValidationFramework
//
// Created by Jack Qiu on 1/12/13.
// Copyright (c) 2013 ustwo™. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "US2Condition.h"
/**
The US2ConditionRegex checks a string for regular expression.
*Example:*
NSString *string = @"1234";
US2ConditionRegex *regexCondition = [[US2ConditionRegex alloc] initWithRegex:@"^[0-9]{4}$];
US2Validator *regexValidator = [[US2Validator alloc] init];
[regexValidator addCondition:regexCondition];
[regexCondition release];
BOOL isValid = [regexValidator checkConditions:string] == nil; // isValid == YES
*/
@interface US2ConditionRegex : US2Condition
@property (nonatomic, strong) NSString *regex;
-(US2ConditionRegex *) initWithRegex:(NSString *)regex;
@end
Jump to Line
Something went wrong with that request. Please try again.