-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Email and Password Validation (#19)
- Update email validation documentation - Add password validation documentation
- Loading branch information
1 parent
ec116ad
commit 0073e92
Showing
9 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Sources/JimUtilitySDK/Extensions/String/String+isValidPassword.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// File.swift | ||
// | ||
// | ||
// Created by James Layton on 1/17/23. | ||
// | ||
|
||
import Foundation | ||
|
||
public extension String { | ||
|
||
/// Ensure is a valid password | ||
/// Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet and 1 Number | ||
/// - Returns: A boolean indicate if the password meet the requirements | ||
func isValidPassword() -> Bool { | ||
let pwRegEx = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{8,}$" | ||
let pwResult = NSPredicate(format:"SELF MATCHES %@", pwRegEx) | ||
return pwResult.evaluate(with: self) | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
11 changes: 0 additions & 11 deletions
11
...tensions/UIViewController+addCustomBackButton/BarButtonDirection/BarButtonDirection.swift
This file was deleted.
Oops, something went wrong.