* * @version 1.0.0 */ class UpdateUser extends FormRequest { /** * Determinar si el usuario esta autorizado * * @return bool */ public function authorize() { return true; } /** * Reglas de validación * * @return array */ public function rules() { return [ 'name' => ['required', 'string'], 'paternal' => ['required', 'string'], 'maternal' => ['nullable', 'string'], 'email' => ['required', 'email', Rule::unique('users')->ignore($this->id)], 'phone' => ['nullable', 'numeric', Rule::unique('users')->ignore($this->id)], ]; } }