Version: v0.7.1 - Beta.  We welcome contributors & feedback.

Password.checkPattern

$password.checkPattern($regex) -> boolean

Description

Returns true if the plaintext password matches the given regex pattern.

$tryPassword = Input.get('password')

if !$tryPassword.checkPattern(r'\d') {
    // need at least one digit
}