URLShorthandCondition
public struct URLShorthandCondition: Condition
The URLShorthandCondition
checks a string for a valid URL.
Note
No scheme (protocol) is needed for a valid URL. If you want a check for more strict URLs seeURLCondition
.
-
Declaration
Swift
public var localizedViolationString = StringLocalization.sharedInstance.localizedString("US2KeyConditionViolationShorthandURL", comment: "")
-
Declaration
Swift
public let regex = "^((https?)://)?[a-z0-9-]+(\\.[a-z0-9-]+)+([/?].*)?$"
-
Declaration
Swift
public var shouldAllowViolation = true
-
Declaration
Swift
public init()