Move user validator methods
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Kanboard\Validator;
|
||||
|
||||
use SimpleValidator\Validators;
|
||||
|
||||
/**
|
||||
* Base Validator
|
||||
*
|
||||
@@ -33,4 +35,20 @@ class Base extends \Kanboard\Core\Base
|
||||
|
||||
return array($result, $errors);
|
||||
}
|
||||
|
||||
/**
|
||||
* Common password validation rules
|
||||
*
|
||||
* @access protected
|
||||
* @return array
|
||||
*/
|
||||
protected function commonPasswordValidationRules()
|
||||
{
|
||||
return array(
|
||||
new Validators\Required('password', t('The password is required')),
|
||||
new Validators\MinLength('password', t('The minimum length is %d characters', 6), 6),
|
||||
new Validators\Required('confirmation', t('The confirmation is required')),
|
||||
new Validators\Equals('password', 'confirmation', t('Passwords don\'t match')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user