Skip to content

Commit

Permalink
adding additional validation Regexes to PasswordValidaiton
Browse files Browse the repository at this point in the history
  • Loading branch information
jpotts18 committed Nov 26, 2014
1 parent 72dd2ed commit 574c3c6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Validator/PasswordValidation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ import Foundation

class PasswordValidation : Validation {

// Alternative Regexes

// 8 characters. One uppercase. One Lowercase. One number.
// var PASSWORD_REGEX = "^(?=.*?[A-Z])(?=.*?[0-9])(?=.*?[a-z]).{8,}$"
//
// no length. One uppercase. One lowercae. One number.
// var PASSWORD_REGEX = "^(?=.*?[A-Z])(?=.*?[0-9])(?=.*?[a-z]).*?$"

// 8 characters. one uppercase
var PASSWORD_REGEX = "^(?=.*?[A-Z]).{8,}$"

Expand Down

0 comments on commit 574c3c6

Please sign in to comment.