mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
Better validation using nullable
This commit is contained in:
parent
7c774352e5
commit
37f93a2861
|
@ -52,14 +52,14 @@ class Asset extends Depreciable
|
|||
'model_id' => 'required|integer',
|
||||
'status_id' => 'required|integer',
|
||||
'company_id' => 'integer',
|
||||
'warranty_months' => 'integer|min:0|max:240',
|
||||
'physical' => 'integer',
|
||||
'warranty_months' => 'numeric|max:240|nullable',
|
||||
'physical' => 'numeric|max:1|nullable',
|
||||
'checkout_date' => 'date|max:10|min:10',
|
||||
'checkin_date' => 'date|max:10|min:10',
|
||||
'supplier_id' => 'integer',
|
||||
'supplier_id' => 'numeric|nullable',
|
||||
'asset_tag' => 'required|min:1|max:255|unique_undeleted',
|
||||
'status' => 'integer',
|
||||
'purchase_cost' => 'numeric',
|
||||
'purchase_cost' => 'numeric|nullable',
|
||||
];
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue