diff options
author | Frédéric Guillot <fred@kanboard.net> | 2018-04-12 15:08:29 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-04-12 15:39:55 -0700 |
commit | 0e8a94ac42c5f4345658d1581f9b2c7afa705a3a (patch) | |
tree | 437e5967e062eead16f2fdd14797d9eba01a584d /app/Validator | |
parent | d8c625c8562f527f4a1a7cec6c3e6904ca11b69d (diff) |
Adjust field size to keep compatibility with MySQL 5.6
Diffstat (limited to 'app/Validator')
-rw-r--r-- | app/Validator/AuthValidator.php | 2 | ||||
-rw-r--r-- | app/Validator/CategoryValidator.php | 2 | ||||
-rw-r--r-- | app/Validator/ColumnValidator.php | 2 | ||||
-rw-r--r-- | app/Validator/CommentValidator.php | 2 | ||||
-rw-r--r-- | app/Validator/GroupValidator.php | 2 | ||||
-rw-r--r-- | app/Validator/PasswordResetValidator.php | 2 | ||||
-rw-r--r-- | app/Validator/SwimlaneValidator.php | 2 | ||||
-rw-r--r-- | app/Validator/TagValidator.php | 2 | ||||
-rw-r--r-- | app/Validator/TaskValidator.php | 2 | ||||
-rw-r--r-- | app/Validator/UserValidator.php | 2 |
10 files changed, 10 insertions, 10 deletions
diff --git a/app/Validator/AuthValidator.php b/app/Validator/AuthValidator.php index daa913c0..e50f90ce 100644 --- a/app/Validator/AuthValidator.php +++ b/app/Validator/AuthValidator.php @@ -37,7 +37,7 @@ class AuthValidator extends BaseValidator { $v = new Validator($values, array( new Validators\Required('username', t('The username is required')), - new Validators\MaxLength('username', t('The maximum length is %d characters', 255), 255), + new Validators\MaxLength('username', t('The maximum length is %d characters', 191), 191), new Validators\Required('password', t('The password is required')), )); diff --git a/app/Validator/CategoryValidator.php b/app/Validator/CategoryValidator.php index f5c7e0f1..1d14891c 100644 --- a/app/Validator/CategoryValidator.php +++ b/app/Validator/CategoryValidator.php @@ -68,7 +68,7 @@ class CategoryValidator extends BaseValidator return array( new Validators\Integer('id', t('The id must be an integer')), new Validators\Integer('project_id', t('The project id must be an integer')), - new Validators\MaxLength('name', t('The maximum length is %d characters', 255), 255) + new Validators\MaxLength('name', t('The maximum length is %d characters', 191), 191) ); } } diff --git a/app/Validator/ColumnValidator.php b/app/Validator/ColumnValidator.php index bc6af7dd..59d3ddf6 100644 --- a/app/Validator/ColumnValidator.php +++ b/app/Validator/ColumnValidator.php @@ -69,7 +69,7 @@ class ColumnValidator extends BaseValidator new Validators\Integer('task_limit', t('This value must be an integer')), new Validators\GreaterThan('task_limit', t('This value must be greater than %d', -1), -1), new Validators\Required('title', t('The title is required')), - new Validators\MaxLength('title', t('The maximum length is %d characters', 255), 255), + new Validators\MaxLength('title', t('The maximum length is %d characters', 191), 191), ); } } diff --git a/app/Validator/CommentValidator.php b/app/Validator/CommentValidator.php index c5149bad..2051cbde 100644 --- a/app/Validator/CommentValidator.php +++ b/app/Validator/CommentValidator.php @@ -91,7 +91,7 @@ class CommentValidator extends BaseValidator new Validators\Integer('id', t('This value must be an integer')), new Validators\Integer('task_id', t('This value must be an integer')), new Validators\Integer('user_id', t('This value must be an integer')), - new Validators\MaxLength('reference', t('The maximum length is %d characters', 255), 255), + new Validators\MaxLength('reference', t('The maximum length is %d characters', 191), 191), new Validators\Required('comment', t('Comment is required')) ); } diff --git a/app/Validator/GroupValidator.php b/app/Validator/GroupValidator.php index 66a20eb9..5b32ed2d 100644 --- a/app/Validator/GroupValidator.php +++ b/app/Validator/GroupValidator.php @@ -62,7 +62,7 @@ class GroupValidator extends BaseValidator { return array( new Validators\Required('name', t('The name is required')), - new Validators\MaxLength('name', t('The maximum length is %d characters', 255), 255), + new Validators\MaxLength('name', t('The maximum length is %d characters', 191), 191), new Validators\Unique('name', t('The name must be unique'), $this->db->getConnection(), GroupModel::TABLE, 'id'), new Validators\MaxLength('external_id', t('The maximum length is %d characters', 255), 255), new Validators\Integer('id', t('This value must be an integer')), diff --git a/app/Validator/PasswordResetValidator.php b/app/Validator/PasswordResetValidator.php index 3c19affe..fb424e89 100644 --- a/app/Validator/PasswordResetValidator.php +++ b/app/Validator/PasswordResetValidator.php @@ -55,7 +55,7 @@ class PasswordResetValidator extends BaseValidator $v = new Validator($values, array( new Validators\Required('captcha', t('This value is required')), new Validators\Required('username', t('The username is required')), - new Validators\MaxLength('username', t('The maximum length is %d characters', 255), 255), + new Validators\MaxLength('username', t('The maximum length is %d characters', 191), 191), )); return array( diff --git a/app/Validator/SwimlaneValidator.php b/app/Validator/SwimlaneValidator.php index fb3d5f11..0df433f2 100644 --- a/app/Validator/SwimlaneValidator.php +++ b/app/Validator/SwimlaneValidator.php @@ -68,7 +68,7 @@ class SwimlaneValidator extends BaseValidator return array( new Validators\Integer('id', t('The id must be an integer')), new Validators\Integer('project_id', t('The project id must be an integer')), - new Validators\MaxLength('name', t('The maximum length is %d characters', 255), 255) + new Validators\MaxLength('name', t('The maximum length is %d characters', 191), 191) ); } } diff --git a/app/Validator/TagValidator.php b/app/Validator/TagValidator.php index 0567cf3e..dddd076d 100644 --- a/app/Validator/TagValidator.php +++ b/app/Validator/TagValidator.php @@ -70,7 +70,7 @@ class TagValidator extends BaseValidator return array( new Validators\Required('project_id', t('Field required')), new Validators\Required('name', t('Field required')), - new Validators\MaxLength('name', t('The maximum length is %d characters', 255), 255), + new Validators\MaxLength('name', t('The maximum length is %d characters', 191), 191), ); } } diff --git a/app/Validator/TaskValidator.php b/app/Validator/TaskValidator.php index 7f905b2d..33d80989 100644 --- a/app/Validator/TaskValidator.php +++ b/app/Validator/TaskValidator.php @@ -41,7 +41,7 @@ class TaskValidator extends BaseValidator new Validators\Integer('recurrence_status', t('This value must be an integer')), new Validators\Integer('priority', t('This value must be an integer')), new Validators\MaxLength('title', t('The maximum length is %d characters', 65535), 65535), - new Validators\MaxLength('reference', t('The maximum length is %d characters', 255), 255), + new Validators\MaxLength('reference', t('The maximum length is %d characters', 191), 191), new Validators\Date('date_due', t('Invalid date'), $this->dateParser->getParserFormats()), new Validators\Date('date_started', t('Invalid date'), $this->dateParser->getParserFormats()), new Validators\Numeric('time_spent', t('This value must be numeric')), diff --git a/app/Validator/UserValidator.php b/app/Validator/UserValidator.php index d7c5a94d..a6f1dc7d 100644 --- a/app/Validator/UserValidator.php +++ b/app/Validator/UserValidator.php @@ -24,7 +24,7 @@ class UserValidator extends BaseValidator { return array( new Validators\MaxLength('role', t('The maximum length is %d characters', 25), 25), - new Validators\MaxLength('username', t('The maximum length is %d characters', 255), 255), + new Validators\MaxLength('username', t('The maximum length is %d characters', 191), 191), new Validators\Unique('username', t('This username is already taken'), $this->db->getConnection(), UserModel::TABLE, 'id'), new Validators\Email('email', t('Email address invalid')), new Validators\Integer('is_ldap_user', t('This value must be an integer')), |