mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
adds validation for all purchase costs variables
This commit is contained in:
parent
33b1ab3658
commit
2c1f368828
|
@ -61,7 +61,7 @@ class Accessory extends SnipeModel
|
||||||
'category_id' => 'required|integer|exists:categories,id',
|
'category_id' => 'required|integer|exists:categories,id',
|
||||||
'company_id' => 'integer|nullable',
|
'company_id' => 'integer|nullable',
|
||||||
'min_amt' => 'integer|min:0|nullable',
|
'min_amt' => 'integer|min:0|nullable',
|
||||||
'purchase_cost' => 'numeric|nullable',
|
'purchase_cost' => 'numeric|nullable|gte:0',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Component extends SnipeModel
|
||||||
'company_id' => 'integer|nullable',
|
'company_id' => 'integer|nullable',
|
||||||
'min_amt' => 'integer|min:0|nullable',
|
'min_amt' => 'integer|min:0|nullable',
|
||||||
'purchase_date' => 'date|nullable',
|
'purchase_date' => 'date|nullable',
|
||||||
'purchase_cost' => 'numeric|nullable',
|
'purchase_cost' => 'numeric|nullable|gte:0',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -39,7 +39,7 @@ class Consumable extends SnipeModel
|
||||||
'category_id' => 'required|integer',
|
'category_id' => 'required|integer',
|
||||||
'company_id' => 'integer|nullable',
|
'company_id' => 'integer|nullable',
|
||||||
'min_amt' => 'integer|min:0|nullable',
|
'min_amt' => 'integer|min:0|nullable',
|
||||||
'purchase_cost' => 'numeric|nullable',
|
'purchase_cost' => 'numeric|nullable|gte:0',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -48,6 +48,7 @@ class License extends Depreciable
|
||||||
'notes' => 'string|nullable',
|
'notes' => 'string|nullable',
|
||||||
'category_id' => 'required|exists:categories,id',
|
'category_id' => 'required|exists:categories,id',
|
||||||
'company_id' => 'integer|nullable',
|
'company_id' => 'integer|nullable',
|
||||||
|
'purchase_cost'=> 'numeric|nullable|gte:0',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue