Validate asset model and status on the model level

This commit is contained in:
snipe 2017-01-12 03:47:45 -08:00
parent 7d2d6a3c1b
commit 03874a5481

View file

@ -44,8 +44,8 @@ class Asset extends Depreciable
protected $rules = [
'name' => 'max:255|nullable',
'model_id' => 'required|integer',
'status_id' => 'required|integer',
'model_id' => 'required|integer|exists:models,id',
'status_id' => 'required|integer|exists:status_labels,id',
'company_id' => 'integer|nullable',
'warranty_months' => 'numeric|nullable',
'physical' => 'numeric|max:1|nullable',