URLCondition
public struct URLCondition: Condition
The URLCondition
checks a string for a valid URL.
Note
The scheme (protocol) is needed for a valid URL. If you want a check for shorthand URLs seeURLShorthandCondition
. Only HTTP and HTTPS schemes are considered valid.
-
Declaration
Swift
public var localizedViolationString = StringLocalization.sharedInstance.localizedString("US2KeyConditionViolationURL", comment: "")
-
Declaration
Swift
public let regex = "^((https?)://)[a-z0-9-]+(\\.[a-z0-9-]+)+([/?].*)?$"
-
Declaration
Swift
public var shouldAllowViolation = true
-
Declaration
Swift
public init()