[L6] Add support for custom model validation logic
This commit is contained in:
parent
5b4a65a60c
commit
c586157dc4
19 changed files with 226 additions and 330 deletions
|
@ -30,19 +30,10 @@ class Nest extends Validable
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected static $applicationRules = [
|
||||
'author' => 'required',
|
||||
'name' => 'required',
|
||||
'description' => 'sometimes',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected static $dataIntegrityRules = [
|
||||
'author' => 'string|email',
|
||||
'name' => 'string|max:255',
|
||||
'description' => 'nullable|string',
|
||||
public static $validationRules = [
|
||||
'author' => 'required|string|email',
|
||||
'name' => 'required|string|max:255',
|
||||
'description' => 'sometimes|nullable|string',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue