mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
prevents values for assets being negative through validation
This commit is contained in:
parent
72fe0d22ea
commit
33b1ab3658
|
@ -111,7 +111,7 @@ class Asset extends Depreciable
|
|||
'asset_tag' => 'required|min:1|max:255|unique_undeleted',
|
||||
'status' => 'integer',
|
||||
'serial' => 'unique_serial|nullable',
|
||||
'purchase_cost' => 'numeric|nullable',
|
||||
'purchase_cost' => 'numeric|nullable|gte:0',
|
||||
'next_audit_date' => 'date|nullable',
|
||||
'last_audit_date' => 'date|nullable',
|
||||
'supplier_id' => 'exists:suppliers,id|nullable',
|
||||
|
|
|
@ -91,6 +91,10 @@ return [
|
|||
'url' => 'The :attribute format is invalid.',
|
||||
'unique_undeleted' => 'The :attribute must be unique.',
|
||||
'non_circular' => 'The :attribute must not create a circular reference.',
|
||||
'gte' => [
|
||||
'numeric' => 'Value cannot be negative'
|
||||
],
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue