mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
48 lines
983 B
PHP
48 lines
983 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateAffiliateRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'campaign_name' => 'required|string|max:255',
|
|
'campaign_description' => 'nullable|string|max:65535',
|
|
'is_active' => 'nullable|boolean',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Get custom error messages for validation rules.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function messages()
|
|
{
|
|
return [
|
|
'campaign_name.required' => 'A campaign name is required.',
|
|
'campaign_name.max' => 'The campaign name cannot exceed 255 characters.',
|
|
];
|
|
}
|
|
}
|
|
|
|
|