NETBien.backend/app/Http/Requests/Netbien/ClientStoreRequest.php
Juan Felipe Zapata Moreno db49b127db ADD: Corte de caja creado
2025-11-05 16:24:22 -06:00

49 lines
1.2 KiB
PHP

<?php namespace App\Http\Requests\Netbien;
/**
* @copyright (c) 2025 Notsoweb Software (https://notsoweb.com) - All Rights Reserved
*/
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Str;
use Illuminate\Validation\Rule;
/**
* Almacenar rol
*
* @author Moisés Cortés C. <moises.cortes@notsoweb.com>
*
* @version 1.0.0
*/
class ClientStoreRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
'name' => ['required', 'string'],
'paternal' => ['required', 'string'],
'maternal' => ['required', 'string'],
'email' => ['nullable', 'email'],
'phone' => ['nullable', 'string', 'max:10'],
'rfc' => ['required', 'string', 'max:13'],
];
}
public function messages() : array
{
return [
'name.required' => 'El nombre es obligatorio.',
'paternal.required' => 'El apellido paterno es obligatorio.',
'maternal.required' => 'El apellido materno es obligatorio.',
'email.email' => 'El email debe ser válido.',
];
}
}