mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Tightened up and removed some validation that wasn’t needed
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
fd2a057d38
commit
9c79fc19cb
|
@ -84,11 +84,11 @@ class Asset extends Depreciable
|
||||||
|
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'purchase_date' => 'datetime',
|
'purchase_date' => 'date',
|
||||||
'last_checkout' => 'datetime',
|
'last_checkout' => 'datetime',
|
||||||
'expected_checkin' => 'datetime',
|
'expected_checkin' => 'date',
|
||||||
'last_audit_date' => 'datetime',
|
'last_audit_date' => 'datetime',
|
||||||
'next_audit_date' => 'datetime',
|
'next_audit_date' => 'date',
|
||||||
'model_id' => 'integer',
|
'model_id' => 'integer',
|
||||||
'status_id' => 'integer',
|
'status_id' => 'integer',
|
||||||
'company_id' => 'integer',
|
'company_id' => 'integer',
|
||||||
|
@ -105,17 +105,14 @@ class Asset extends Depreciable
|
||||||
'company_id' => 'integer|nullable',
|
'company_id' => 'integer|nullable',
|
||||||
'warranty_months' => 'numeric|nullable|digits_between:0,240',
|
'warranty_months' => 'numeric|nullable|digits_between:0,240',
|
||||||
'physical' => 'numeric|max:1|nullable',
|
'physical' => 'numeric|max:1|nullable',
|
||||||
'checkout_date' => 'date_format:Y-m-d|max:10|min:10|nullable',
|
'last_checkout' => 'date|date_format:Y-m-d H:i:s|nullable',
|
||||||
'checkin_date' => 'date_format:Y-m-d|max:10|min:10|nullable',
|
'expected_checkin' => 'date|date_format:Y-m-d|nullable',
|
||||||
'location_id' => 'exists:locations,id|nullable',
|
'location_id' => 'exists:locations,id|nullable',
|
||||||
'rtd_location_id' => 'exists:locations,id|nullable',
|
'rtd_location_id' => 'exists:locations,id|nullable',
|
||||||
'asset_tag' => 'required|min:1|max:255|unique_undeleted',
|
'asset_tag' => 'required|min:1|max:255|unique_undeleted',
|
||||||
'status' => 'integer',
|
'purchase_date' => 'date|date_format:Y-m-d|nullable',
|
||||||
'purchase_date' => 'date_format:Y-m-d|nullable',
|
|
||||||
'serial' => 'unique_serial|nullable',
|
'serial' => 'unique_serial|nullable',
|
||||||
'purchase_cost' => 'numeric|nullable|gte:0',
|
'purchase_cost' => 'numeric|nullable|gte:0',
|
||||||
'next_audit_date' => 'date_format:Y-m-d|nullable',
|
|
||||||
'last_audit_date' => 'date_format:Y-m-d|nullable',
|
|
||||||
'supplier_id' => 'exists:suppliers,id|nullable',
|
'supplier_id' => 'exists:suppliers,id|nullable',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue