You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
1.1 KiB

<?php
namespace App\Http\Requests\Subscriptions;
use App\Http\Requests\Request;
class CreateRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return auth()->user()->can('manage_subscriptions');
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'domain_name' => 'required|max:60|unique:subscriptions,domain_name',
'epp_code' => 'max:60',
'domain_price' => 'required|numeric',
'hosting_capacity' => 'max:60',
'hosting_price' => 'required_with:hosting_capacity|numeric',
'start_date' => 'required|date|date_format:Y-m-d',
'due_date' => 'required|date|date_format:Y-m-d',
'project_id' => 'required|numeric',
'vendor_id' => 'required|numeric',
'remark' => 'max:255',
];
}
}