mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-21 15:53:45 +02:00
[L6] Add support for custom model validation logic
This commit is contained in:
@@ -45,24 +45,15 @@ class EggVariable extends Validable
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected static $applicationRules = [
|
||||
'name' => 'required',
|
||||
'env_variable' => 'required',
|
||||
'rules' => 'required',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected static $dataIntegrityRules = [
|
||||
public static $validationRules = [
|
||||
'egg_id' => 'exists:eggs,id',
|
||||
'name' => 'string|between:1,255',
|
||||
'name' => 'required|string|between:1,255',
|
||||
'description' => 'string',
|
||||
'env_variable' => 'regex:/^[\w]{1,255}$/|notIn:' . self::RESERVED_ENV_NAMES,
|
||||
'env_variable' => 'required|regex:/^[\w]{1,255}$/|notIn:' . self::RESERVED_ENV_NAMES,
|
||||
'default_value' => 'string',
|
||||
'user_viewable' => 'boolean',
|
||||
'user_editable' => 'boolean',
|
||||
'rules' => 'string',
|
||||
'rules' => 'required|string',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user