Fixed an issue with the way the regex pattern was generated for the SecureValidationRule type in the library target.
This commit is contained in:
@@ -81,7 +81,7 @@ private extension SecureValidationRule {
|
||||
/// - Parameter input: An input to validate.
|
||||
/// - Returns: A flag that indicates whether a given input is valid or not.
|
||||
func isValid(_ input: String) -> Bool {
|
||||
let regexPattern: String = .init(format: .Pattern.securityInput, inputType.rawValue)
|
||||
let regexPattern = String(format: .Pattern.securityInput, inputType.rawValue)
|
||||
|
||||
do {
|
||||
if #available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 6.0, *) {
|
||||
@@ -131,5 +131,5 @@ private extension SecureValidationRule {
|
||||
|
||||
private extension String.Pattern {
|
||||
/// A regular expression pattern to match the security inputs against.
|
||||
static let securityInput = "^([a-z]|[A-Z]){%@}$"
|
||||
static let securityInput = "^([a-z]|[A-Z]){%d}$"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user