Added type casting and a few more validation rules
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
@@ -24,11 +24,11 @@ class AssetModel extends SnipeModel
|
||||
|
||||
// Declare the rules for the model validation
|
||||
protected $rules = array(
|
||||
'name' => 'required|min:1|max:255',
|
||||
'name' => 'required|min:1|max:255',
|
||||
'model_number' => 'max:255|nullable',
|
||||
'category_id' => 'required|integer|exists:categories,id',
|
||||
'manufacturer_id' => 'required|integer|exists:manufacturers,id',
|
||||
'eol' => 'integer:min:0|max:240|nullable',
|
||||
'eol' => 'integer:min:0|max:240|nullable',
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user