Inherits from US2Condition : NSObject
Declared in US2ConditionShorthandURL.h

Overview

The US2ConditionShorthandURL checks a string for a valid URL like: http://www.example.com https://www.example.com www.example.com example.com subdomain.example.com

No scheme (protocol) is needed for a valid URL. If you want a check for more strict URLs see US2ConditionURL.

Example:

NSString *string = @“example.com”;

US2ConditionURL *shorthandUrlCondition = [[[US2ConditionShorthandURL alloc] init] autorelease];

US2Validator *shorthandUrlValidator = [[US2Validator alloc] init]; [shorthandUrlValidator addCondition:shorthandUrlCondition];

BOOL isValid = [shorthandUrlValidator checkConditions:string] == nil; // isValid == YES