Validate checkout_to_type on asset checkout

This commit is contained in:
snipe 2017-11-27 21:20:12 -08:00
parent b6c258bb12
commit ea2f7617df

View file

@ -24,9 +24,10 @@ class AssetCheckoutRequest extends Request
public function rules()
{
$rules = [
"assigned_user" => 'required_without_all:assigned_asset,assigned_location',
"assigned_asset" => 'required_without_all:assigned_user,assigned_location|different:'.$this->id,
"assigned_location" => 'required_without_all:assigned_user,assigned_asset',
"assigned_user" => 'required_without_all:assigned_asset,assigned_location',
"assigned_asset" => 'required_without_all:assigned_user,assigned_location|different:'.$this->id,
"assigned_location" => 'required_without_all:assigned_user,assigned_asset',
"checkout_to_type" => 'required|in:asset,location,user'
];