dereuromark/cakephp-tools — pull request #104 by LDSign (2014-11-18 07:29:16+00:00)
Title: PasswordableBehavior: Some changes/features

Hi

I've made some small changes to your PasswordableBehavior:

- Added option to use complex regex validation rule (optionally)

array(
'customValidationRule' =>
'/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{8,20}$/',
'customValidationMessage' => __('Password should have at least 1 upper
case, lower case and numeric or special character.')
)

- Moved validation ruleset to __construct and wrapped messages in __()
to allow finding translation strings with an external parser (e.g.
poedit)

- Removed "between" validation for password repeat (I think this is
unnecessary - perhaps it would be good to go further and remove any
validation if the main password field fails first)

- Bumped version to 1.9

What do you think Mark?

Cheers,
Frank