* * @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.', ]; } }