Replace all instances of 255 as a max length with 191; ref #2421
This commit is contained in:
parent
4f21fa85f8
commit
cc6f98c0fd
24 changed files with 41 additions and 38 deletions
|
@ -50,7 +50,7 @@ class DatabaseHost extends Model
|
|||
* @var array
|
||||
*/
|
||||
public static $validationRules = [
|
||||
'name' => 'required|string|max:255',
|
||||
'name' => 'required|string|max:191',
|
||||
'host' => 'required|string',
|
||||
'port' => 'required|numeric|between:1,65535',
|
||||
'username' => 'required|string|max:32',
|
||||
|
|
|
@ -93,13 +93,13 @@ class Egg extends Model
|
|||
public static $validationRules = [
|
||||
'nest_id' => 'required|bail|numeric|exists:nests,id',
|
||||
'uuid' => 'required|string|size:36',
|
||||
'name' => 'required|string|max:255',
|
||||
'name' => 'required|string|max:191',
|
||||
'description' => 'string|nullable',
|
||||
'author' => 'required|string|email',
|
||||
'docker_image' => 'required|string|max:255',
|
||||
'docker_image' => 'required|string|max:191',
|
||||
'startup' => 'required|nullable|string',
|
||||
'config_from' => 'sometimes|bail|nullable|numeric|exists:eggs,id',
|
||||
'config_stop' => 'required_without:config_from|nullable|string|max:255',
|
||||
'config_stop' => 'required_without:config_from|nullable|string|max:191',
|
||||
'config_startup' => 'required_without:config_from|nullable|json',
|
||||
'config_logs' => 'required_without:config_from|nullable|json',
|
||||
'config_files' => 'required_without:config_from|nullable|json',
|
||||
|
|
|
@ -73,9 +73,9 @@ class EggVariable extends Model
|
|||
*/
|
||||
public static $validationRules = [
|
||||
'egg_id' => 'exists:eggs,id',
|
||||
'name' => 'required|string|between:1,255',
|
||||
'name' => 'required|string|between:1,191',
|
||||
'description' => 'string',
|
||||
'env_variable' => 'required|regex:/^[\w]{1,255}$/|notIn:' . self::RESERVED_ENV_NAMES,
|
||||
'env_variable' => 'required|regex:/^[\w]{1,191}$/|notIn:' . self::RESERVED_ENV_NAMES,
|
||||
'default_value' => 'string',
|
||||
'user_viewable' => 'boolean',
|
||||
'user_editable' => 'boolean',
|
||||
|
|
|
@ -41,7 +41,7 @@ class Location extends Model
|
|||
*/
|
||||
public static $validationRules = [
|
||||
'short' => 'required|string|between:1,60|unique:locations,short',
|
||||
'long' => 'string|nullable|between:1,255',
|
||||
'long' => 'string|nullable|between:1,191',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -56,7 +56,7 @@ class Mount extends Model
|
|||
*/
|
||||
public static $validationRules = [
|
||||
'name' => 'required|string|min:2|max:64|unique:mounts,name',
|
||||
'description' => 'nullable|string|max:255',
|
||||
'description' => 'nullable|string|max:191',
|
||||
'source' => 'required|string',
|
||||
'target' => 'required|string',
|
||||
'read_only' => 'sometimes|boolean',
|
||||
|
|
|
@ -44,7 +44,7 @@ class Nest extends Model
|
|||
*/
|
||||
public static $validationRules = [
|
||||
'author' => 'required|string|email',
|
||||
'name' => 'required|string|max:255',
|
||||
'name' => 'required|string|max:191',
|
||||
'description' => 'nullable|string',
|
||||
];
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ class Schedule extends Model
|
|||
*/
|
||||
public static $validationRules = [
|
||||
'server_id' => 'required|exists:servers,id',
|
||||
'name' => 'required|string|max:255',
|
||||
'name' => 'required|string|max:191',
|
||||
'cron_day_of_week' => 'required|string',
|
||||
'cron_day_of_month' => 'required|string',
|
||||
'cron_hour' => 'required|string',
|
||||
|
|
|
@ -103,7 +103,7 @@ class Server extends Model
|
|||
public static $validationRules = [
|
||||
'external_id' => 'sometimes|nullable|string|between:1,191|unique:servers',
|
||||
'owner_id' => 'required|integer|exists:users,id',
|
||||
'name' => 'required|string|min:1|max:255',
|
||||
'name' => 'required|string|min:1|max:191',
|
||||
'node_id' => 'required|exists:nodes,id',
|
||||
'description' => 'string',
|
||||
'memory' => 'required|numeric|min:0',
|
||||
|
@ -118,7 +118,7 @@ class Server extends Model
|
|||
'egg_id' => 'required|exists:eggs,id',
|
||||
'startup' => 'required|string',
|
||||
'skip_scripts' => 'sometimes|boolean',
|
||||
'image' => 'required|string|max:255',
|
||||
'image' => 'required|string|max:191',
|
||||
'installed' => 'in:0,1,2',
|
||||
'database_limit' => 'present|nullable|integer|min:0',
|
||||
'allocation_limit' => 'sometimes|nullable|integer|min:0',
|
||||
|
|
|
@ -25,7 +25,7 @@ class Setting extends Model
|
|||
* @var array
|
||||
*/
|
||||
public static $validationRules = [
|
||||
'key' => 'required|string|between:1,255',
|
||||
'key' => 'required|string|between:1,191',
|
||||
'value' => 'string',
|
||||
];
|
||||
}
|
||||
|
|
|
@ -137,11 +137,11 @@ class User extends Model implements
|
|||
*/
|
||||
public static $validationRules = [
|
||||
'uuid' => 'required|string|size:36|unique:users,uuid',
|
||||
'email' => 'required|email|unique:users,email',
|
||||
'external_id' => 'sometimes|nullable|string|max:255|unique:users,external_id',
|
||||
'username' => 'required|between:1,255|unique:users,username',
|
||||
'name_first' => 'required|string|between:1,255',
|
||||
'name_last' => 'required|string|between:1,255',
|
||||
'email' => 'required|email|between:1,191|unique:users,email',
|
||||
'external_id' => 'sometimes|nullable|string|max:191|unique:users,external_id',
|
||||
'username' => 'required|between:1,191|unique:users,username',
|
||||
'name_first' => 'required|string|between:1,191',
|
||||
'name_last' => 'required|string|between:1,191',
|
||||
'password' => 'sometimes|nullable|string',
|
||||
'root_admin' => 'boolean',
|
||||
'language' => 'string',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue