timacdonald/pulse-validation-errors
A Laravel Pulse card for monitoring validation errors across your app. See which rules fail most often, identify problematic forms and endpoints, and spot trends to improve user experience and data quality.
composer require timacdonald/pulse-validation-errors
# optional – tune ignore rules etc.
php artisan vendor:publish --tag="pulse-validation-errors-config"
Register the card on your Pulse dashboard (typically app/Providers/PulseServiceProvider.php):
use Laravel\Pulse\Facades\Pulse;
use Timacdonald\PulseValidationErrors\Livewire\ValidationErrors;
Pulse::dashboard(function ($dashboard) {
$dashboard->add(ValidationErrors::class);
});
No other wiring is required — the package registers the recorder automatically, hooks into Laravel's validation exception flow, and starts storing entries under its own Pulse type (validation_errors).
First use case: ship it, leave it running for a day, then open Pulse and look at the highest-count messages. The card surfaces the actual failure text (e.g. "The email field must be a valid email address.") so you can immediately spot form copy that users trip over, fields that should be optional, or a front-end sending the wrong shape of data. That first report usually produces three or four quick wins in onboarding/funnel screens.
config/pulse-validation-errors.php, add regexes for messages you don't want to count — e.g. /The (email|password) field is required/ on a login form where a blank submission is normal. This keeps the card focused on genuinely surprising errors.email=not-an-email to a form) and confirm it shows up in the card. This is the fastest way to prove the recorder is wired correctly before trusting production numbers.SlowRequests, Exceptions, etc., and control placement with $dashboard->add(ValidationErrors::class, 'full') for width.Pulse::record) is where you should not diverge.ValidationException is captured. Authorization failures, manual abort(422), $validator->errors() that you return without throwing, and custom exceptions that look like validation errors won't be recorded. If numbers feel low, this is the first thing to check.try/catch a ValidationException and render your own response, the recorder may never see it. Let it propagate to Laravel's handler, or trigger a recorder manually if you need parity.Pulse::ingest() or the pulse queue/pulse:check isn't running. If the card shows "No validation errors", confirm other Pulse cards are populated first./^The email field is required$/) and be specific; a loose pattern will silently hide the errors you actually wanted to see. Test rules by triggering the message and confirming the card stays empty.config/pulse-validation-errors.php in production, run php artisan config:clear (or redeploy with a fresh config cache). Silent no-ops after a config change are almost always a stale cache."{$value} is not available"), every value becomes a distinct row. Normalise such messages in your validator rather than relying on the card to filter them.How can I help you explore Laravel packages today?