Update MinLengthRule.swift
This commit is contained in:
parent
a2f8787113
commit
07cc072e20
|
|
@ -22,7 +22,7 @@ class MinLengthRule : Rule {
|
|||
}
|
||||
|
||||
func validate(value: String) -> Bool {
|
||||
if count(value) <= DEFAULT_MIN_LENGTH {
|
||||
if count(value) < DEFAULT_MIN_LENGTH {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
@ -31,4 +31,4 @@ class MinLengthRule : Rule {
|
|||
func errorMessage() -> String {
|
||||
return "Must be at least \(DEFAULT_MIN_LENGTH) characters long"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue