mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Make sure the category and manufacturer ids exist
This commit is contained in:
parent
c7e1b426e7
commit
fbbf5e77b4
|
@ -26,8 +26,8 @@ class AssetModel extends SnipeModel
|
|||
protected $rules = array(
|
||||
'name' => 'required|min:1|max:255',
|
||||
'model_number' => 'min:1|max:255',
|
||||
'category_id' => 'required|integer',
|
||||
'manufacturer_id' => 'required|integer',
|
||||
'category_id' => 'required|integer|exists:categories,id',
|
||||
'manufacturer_id' => 'required|integer|exists:manufacturers,id',
|
||||
'eol' => 'integer:min:0|max:24|nullable',
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue