Added type casting and a few more validation rules

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2020-04-22 06:37:40 -07:00
parent a44d1cc0cf
commit fa5134603f
8 changed files with 52 additions and 9 deletions
+2 -2
View File
@@ -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',
);
/**