37 lines
764 B
PHP
37 lines
764 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\App;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class InvoiceRequestProcessRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true; // Autorización manejada por middleware
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'notes' => ['nullable', 'string', 'max:500'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Get custom messages for validator errors.
|
|
*/
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'notes.max' => 'Las notas no pueden exceder 500 caracteres',
|
|
];
|
|
}
|
|
}
|