Adjust field size to keep compatibility with MySQL 5.6
This commit is contained in:
@@ -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')),
|
||||
));
|
||||
|
||||
|
||||
@@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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')),
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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')),
|
||||
|
||||
@@ -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')),
|
||||
|
||||
Reference in New Issue
Block a user