mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-14 09:01:42 -04:00
44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Modules\StudioPlus\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StudioPlusAsinRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'title' => ['required', 'string', 'max:191'],
|
|
'description' => ['required'],
|
|
'range_amount' => ['nullable', 'string', 'max:191'],
|
|
'payout_amount' => ['required'],
|
|
'min_range' => ['required', 'numeric', 'min:1', 'lt:max_range'],
|
|
'max_range' => ['required', 'numeric', 'min:1', 'gt:min_range']
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function messages()
|
|
{
|
|
return [
|
|
'min_range.lt' => 'The min range must be less than max range.',
|
|
'max_range.gt' => 'The max range must be greater than min range.',
|
|
];
|
|
}
|
|
}
|