Tightened up and removed some validation that wasn’t needed

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-01-24 17:37:15 -08:00
parent fd2a057d38
commit 9c79fc19cb

View file

@ -84,11 +84,11 @@ class Asset extends Depreciable
protected $casts = [
'purchase_date' => 'datetime',
'purchase_date' => 'date',
'last_checkout' => 'datetime',
'expected_checkin' => 'datetime',
'expected_checkin' => 'date',
'last_audit_date' => 'datetime',
'next_audit_date' => 'datetime',
'next_audit_date' => 'date',
'model_id' => 'integer',
'status_id' => 'integer',
'company_id' => 'integer',
@ -105,17 +105,14 @@ class Asset extends Depreciable
'company_id' => 'integer|nullable',
'warranty_months' => 'numeric|nullable|digits_between:0,240',
'physical' => 'numeric|max:1|nullable',
'checkout_date' => 'date_format:Y-m-d|max:10|min:10|nullable',
'checkin_date' => 'date_format:Y-m-d|max:10|min:10|nullable',
'last_checkout' => 'date|date_format:Y-m-d H:i:s|nullable',
'expected_checkin' => 'date|date_format:Y-m-d|nullable',
'location_id' => 'exists:locations,id|nullable',
'rtd_location_id' => 'exists:locations,id|nullable',
'asset_tag' => 'required|min:1|max:255|unique_undeleted',
'status' => 'integer',
'purchase_date' => 'date_format:Y-m-d|nullable',
'purchase_date' => 'date|date_format:Y-m-d|nullable',
'serial' => 'unique_serial|nullable',
'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',
];