mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Validate checkout_to_type on asset checkout
This commit is contained in:
parent
b6c258bb12
commit
ea2f7617df
|
@ -24,9 +24,10 @@ class AssetCheckoutRequest extends Request
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
"assigned_user" => 'required_without_all:assigned_asset,assigned_location',
|
"assigned_user" => 'required_without_all:assigned_asset,assigned_location',
|
||||||
"assigned_asset" => 'required_without_all:assigned_user,assigned_location|different:'.$this->id,
|
"assigned_asset" => 'required_without_all:assigned_user,assigned_location|different:'.$this->id,
|
||||||
"assigned_location" => 'required_without_all:assigned_user,assigned_asset',
|
"assigned_location" => 'required_without_all:assigned_user,assigned_asset',
|
||||||
|
"checkout_to_type" => 'required|in:asset,location,user'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue