35 lines
799 B
PHP
35 lines
799 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\User;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class SettingsRequest 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 [
|
|
'text_color' => ['required', 'string', 'max:7'],
|
|
'background_color' => ['required', 'string', 'max:7'],
|
|
'font' => ['required', 'string', 'max:255'],
|
|
'font_size' => ['required', 'numeric'],
|
|
'line_spacing' => ['required', 'numeric'],
|
|
];
|
|
}
|
|
}
|