Validation Errors Card for Laravel Pulse

The Validation Errors Card for Laravel Pulse shows useful metrics for validation errors impacting users. What I love about this Pulse card is that it shows how real users experience and interact with validation errors in your app.

Validation Errors Card in Laravel Pulse
Validation Errors Card in Laravel Pulse

This package includes the following main features with the initial release:

  • Supports multiple error bags
  • Supports session based validation errors
  • Supports API validation errors
  • Support Inertia validation errors
  • Fallback for undetectable validation errors (based on 422 response status)

To get started with this package you can install it via Composer:

composer require timacdonald/pulse-validation-errors

Then you can configure it as a recorder in the pulse.php config file and then add the card your Pulse dashboard:

return [
    // ...

    'recorders' => [
        TiMacDonald\Pulse\Recorders\ValidationErrors::class => [
            'enabled' => env('PULSE_VALIDATION_ERRORS_ENABLED', true),
            'sample_rate' => env('PULSE_VALIDATION_ERRORS_SAMPLE_RATE', 1),
            'capture_messages' => true,
            'ignore' => [
                // '#^/login$#',
                // '#^/register$#',
                // '#^/forgot-password$#',

        // ...

// Add to your Pulse dashboard view
// <livewire:pulse.validation-errors cols="8" rows="4" />

You can learn more about this package, get full installation instructions, and view the source code on GitHub. To get started with Pulse, follow the setup guide in the Laravel Documentation.

The post Validation Errors Card for Laravel Pulse appeared first on Laravel News.

Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.

Read more

© 2024 Extly, CB - All rights reserved.