mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Merge pull request #1939 from Sir3lit/optionaldesc
Allow description fields to be optional
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Pterodactyl\Models;
|
||||
* @property int $nest_id
|
||||
* @property string $author
|
||||
* @property string $name
|
||||
* @property string $description
|
||||
* @property string|null $description
|
||||
* @property string $docker_image
|
||||
* @property string|null $config_files
|
||||
* @property string|null $config_startup
|
||||
@@ -95,7 +95,7 @@ class Egg extends Model
|
||||
'nest_id' => 'required|bail|numeric|exists:nests,id',
|
||||
'uuid' => 'required|string|size:36',
|
||||
'name' => 'required|string|max:255',
|
||||
'description' => 'required|string',
|
||||
'description' => 'string|nullable',
|
||||
'author' => 'required|string|email',
|
||||
'docker_image' => 'required|string|max:255',
|
||||
'startup' => 'required|nullable|string',
|
||||
|
||||
@@ -31,7 +31,7 @@ class Location extends Model
|
||||
*/
|
||||
public static $validationRules = [
|
||||
'short' => 'required|string|between:1,60|unique:locations,short',
|
||||
'long' => 'required|string|between:1,255',
|
||||
'long' => 'string|nullable|between:1,255',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Pterodactyl\Models;
|
||||
* @property string $uuid
|
||||
* @property string $author
|
||||
* @property string $name
|
||||
* @property string $description
|
||||
* @property string|null $description
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
*
|
||||
@@ -46,7 +46,7 @@ class Nest extends Model
|
||||
public static $validationRules = [
|
||||
'author' => 'required|string|email',
|
||||
'name' => 'required|string|max:255',
|
||||
'description' => 'sometimes|nullable|string',
|
||||
'description' => 'nullable|string',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ use Illuminate\Contracts\Encryption\Encrypter;
|
||||
* @property string $uuid
|
||||
* @property bool $public
|
||||
* @property string $name
|
||||
* @property string $description
|
||||
* @property string|null $description
|
||||
* @property int $location_id
|
||||
* @property string $fqdn
|
||||
* @property string $scheme
|
||||
@@ -111,7 +111,7 @@ class Node extends Model
|
||||
*/
|
||||
public static $validationRules = [
|
||||
'name' => 'required|regex:/^([\w .-]{1,100})$/',
|
||||
'description' => 'string',
|
||||
'description' => 'string|nullable',
|
||||
'location_id' => 'required|exists:locations,id',
|
||||
'public' => 'boolean',
|
||||
'fqdn' => 'required|string',
|
||||
|
||||
Reference in New Issue
Block a user