timacdonald / pulse-validation-errors

Validation errors card for Laravel Pulse
90 stars 5 forks source link

unknown validation name #21

Closed syofyanzuhad closed 3 months ago

syofyanzuhad commented 3 months ago

my card showing like this, anyone know why?

image
timacdonald commented 3 months ago

You validation response is not formatted in the conventional way, so there is no way to detect the correct input name or error message.

What does one of these responses look like?

syofyanzuhad commented 3 months ago
"<section wire:id=\"y1quDEAw2jRtVO72tPFT\"\n    class=\"@container flex flex-col p-3 sm:p-6 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 rounded-xl shadow-sm ring-1 ring-gray-900/5 default:col-span-full default:lg:col-span-12 default:row-span-4\"\n    x-data=\"{\n        loading: false,\n        init() {\n                            Livewire.hook('commit', ({ component, succeed }) => {\n                    if (component.id === $wire.__instance.id) {\n                        succeed(() => this.loading = false)\n                    }\n                })\n                    }\n    }\"\n>\n    <header class=\"flex flex-wrap justify-between items-center gap-4 mb-3 @md:mb-6\">\n    <div class=\"flex-1 basis-0 flex-grow-[10000] max-w-full\">\n        <div class=\"flex overflow-hidden gap-2 items-start\">\n            <!--[if BLOCK]><![endif]-->                <div class=\"[&>svg]:flex-shrink-0 [&>svg]:w-6 [&>svg]:h-6 [&>svg]:stroke-gray-400 [&>svg]:dark:stroke-gray-600\">\n                    <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"w-6 h-6\">\n              <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z\" />\n            </svg>\n                </div>\n            <!--[if ENDBLOCK]><![endif]-->\n            <hgroup class=\"flex flex-wrap items-baseline gap-x-2 overflow-hidden\">\n                <h2 class=\"text-base font-bold text-gray-600 dark:text-gray-300 truncate\" title=\"Time: 4ms; Run at: 2024-05-31 17:17:58;\">Validation Errors</h2>\n                <!--[if BLOCK]><![endif]-->                    <p class=\"text-gray-400 dark:text-gray-600 font-medium truncate\"><small class=\"text-xs\">past 24 hours</small></p>\n                <!--[if ENDBLOCK]><![endif]-->\n            </hgroup>\n        </div>\n    </div>\n    <!--[if BLOCK]><![endif]--><!--[if ENDBLOCK]><![endif]-->\n</header>\n\n    <div\n    x-data=\"{\n        init() {\n            $nextTick(() => this.scroll())\n        },\n        scroll() {\n            const { content, fade } = this.$refs\n\n            if (! fade) {\n                return\n            }\n\n            const distanceToBottom = content.scrollHeight - (content.scrollTop + content.clientHeight)\n\n            if (distanceToBottom >= 24) {\n                fade.style.transform = `scaleY(1)`\n            } else {\n                fade.style.transform = `scaleY(${distanceToBottom / 24})`\n            }\n        }\n    }\"\n    class=\"@container/scroll-wrapper flex-grow flex w-full overflow-hidden basis-56\" :class=\"loading &amp;&amp; &#039;opacity-25 animate-pulse&#039;\" wire:poll.5s=\"\"\n>\n    <div x-ref=\"content\" class=\"flex-grow basis-full overflow-y-auto scrollbar:w-1.5 scrollbar:h-1.5 scrollbar:bg-transparent scrollbar-track:bg-gray-100 scrollbar-thumb:rounded scrollbar-thumb:bg-gray-300 scrollbar-track:rounded dark:scrollbar-track:bg-gray-500/10 dark:scrollbar-thumb:bg-gray-500/50 supports-scrollbars:pr-3\" @scroll.debounce.5ms=\"scroll\">\n        <!--[if BLOCK]><![endif]-->            <table class=\"w-full\">\n    <thead class=\"sticky z-10 top-0 bg-white dark:bg-gray-900\">\n    <tr>\n                        <th class=\"text-xs text-gray-500 uppercase py-2 first:pl-3 last:pr-3 px-1 @sm:px-3 default:text-left\">\n    Error\n</th>\n                        <th class=\"text-xs text-gray-500 uppercase py-2 first:pl-3 last:pr-3 px-1 @sm:px-3 default:text-left text-right\">\n    Count\n</th>\n                    </tr>\n</thead>\n                <tbody>\n                    <!--[if BLOCK]><![endif]-->                        <tr wire:key=\"bc03daeb561761e915c1b9313a0aa8e2-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"bc03daeb561761e915c1b9313a0aa8e2\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-purple-400 dark:text-purple-300 bg-purple-50 dark:bg-purple-900 border-purple-200 dark:border-purple-700\">GET</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/org/count-employees\">\n                                        /api/org/count-employees\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\OrgController@count_employees\">\n                                    App\\Http\\Controllers\\OrgController@count_employees\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    31\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                                            <tr wire:key=\"52843a4d2959be77c1cbd7e3b6136a2d-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"52843a4d2959be77c1cbd7e3b6136a2d\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-blue-400 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700\">POST</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/schedule/assign\">\n                                        /api/schedule/assign\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\Schedule\\AssignController\">\n                                    App\\Http\\Controllers\\Schedule\\AssignController\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    24\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                                            <tr wire:key=\"697006143337655630aca93128df2e69-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"697006143337655630aca93128df2e69\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-blue-400 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700\">POST</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/setting/import/employee\">\n                                        /api/setting/import/employee\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\Setting\\DataManagement\\ImportEmployeeController\">\n                                    App\\Http\\Controllers\\Setting\\DataManagement\\ImportEmployeeController\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    14\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                                            <tr wire:key=\"c9fb2ed359f2ab34ec4dfae7fef29f37-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"c9fb2ed359f2ab34ec4dfae7fef29f37\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-blue-400 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700\">POST</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/mobile/auth/login\">\n                                        /api/mobile/auth/login\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\Mobile\\AuthController@login\">\n                                    App\\Http\\Controllers\\Mobile\\AuthController@login\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    8\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                                            <tr wire:key=\"741caf696e1e6a1ffcbcb641ddb5bc67-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"741caf696e1e6a1ffcbcb641ddb5bc67\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-blue-400 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700\">POST</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/password/forgot-password\">\n                                        /api/password/forgot-password\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\Auth\\ForgotPasswordController@sendResetLinkResponse\">\n                                    App\\Http\\Controllers\\Auth\\ForgotPasswordController@sendResetLinkResponse\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    8\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                                            <tr wire:key=\"fb7f6f11e0f46ba5e20cda380b3bbd87-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"fb7f6f11e0f46ba5e20cda380b3bbd87\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-blue-400 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700\">PUT</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/employee/{employee}\">\n                                        /api/employee/{employee}\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\EmployeeController@update\">\n                                    App\\Http\\Controllers\\EmployeeController@update\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    3\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                                            <tr wire:key=\"36fcc5b2a90c93c55bcdaba5c2beaf6b-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"36fcc5b2a90c93c55bcdaba5c2beaf6b\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-blue-400 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700\">PUT</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/setting/company/{company}\">\n                                        /api/setting/company/{company}\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\Setting\\Company\\CompanyController@update\">\n                                    App\\Http\\Controllers\\Setting\\Company\\CompanyController@update\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    2\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                                            <tr wire:key=\"e902b7891bce7b92db480605f1d4ef8c-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"e902b7891bce7b92db480605f1d4ef8c\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-blue-400 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700\">PUT</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/employee/bpjs\">\n                                        /api/employee/bpjs\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\Employee\\BpjsController@update\">\n                                    App\\Http\\Controllers\\Employee\\BpjsController@update\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    1\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                                            <tr wire:key=\"e4436366d9c018f9dcc7f93cd892167a-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"e4436366d9c018f9dcc7f93cd892167a\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-blue-400 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700\">PUT</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/employee/tax\">\n                                        /api/employee/tax\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\Employee\\TaxController@update\">\n                                    App\\Http\\Controllers\\Employee\\TaxController@update\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    1\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                                            <tr wire:key=\"d51f70b75d10c20f879f306b651ff170-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"d51f70b75d10c20f879f306b651ff170\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-blue-400 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700\">POST</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/attendance/request-overtime\">\n                                        /api/attendance/request-overtime\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\Attendance\\RequestOvertimeController@store\">\n                                    App\\Http\\Controllers\\Attendance\\RequestOvertimeController@store\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    1\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                                            <tr wire:key=\"264d4753c0073be3b9a5ac4283cc4795-spacer\" class=\"h-2 first:h-0\"></tr>\n                        <tr wire:key=\"264d4753c0073be3b9a5ac4283cc4795\">\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 overflow-hidden max-w-[1px] space-y-2\">\n    <div class=\"truncate\" title=\"[__laravel_unknown] __laravel_unknown\">\n                                    <span class=\"font-mono\">[__laravel_unknown]</span> <span class=\"text-gray-500 dark:text-gray-400\">__laravel_unknown</span>\n                                </div>\n                                <div class=\"flex gap-2\">\n                                    <span class=\"text-xs font-mono px-1 border rounded font-semibold text-blue-400 dark:text-blue-300 bg-blue-50 dark:bg-blue-900 border-blue-200 dark:border-blue-700\">POST</span>\n                                    <code class=\"block text-xs text-gray-900 dark:text-gray-100 truncate\" title=\"/api/mobile/attendance/check-out\">\n                                        /api/mobile/attendance/check-out\n                                    </code>\n                                </div>\n                                <p class=\"text-xs text-gray-500 dark:text-gray-400 truncate\" title=\"App\\Http\\Controllers\\Mobile\\Attendance\\CheckoutController\">\n                                    App\\Http\\Controllers\\Mobile\\Attendance\\CheckoutController\n                                </p>\n</td>\n                            <td class=\"first:rounded-l-md last:rounded-r-md text-sm bg-gray-50 dark:bg-gray-800/50 first:pl-3 last:pr-3 px-1 @sm:px-3 py-3 text-right tabular-nums whitespace-nowrap text-gray-700 dark:text-gray-300 font-bold w-32\">\n    <!--[if BLOCK]><![endif]-->                                    1\n                                <!--[if ENDBLOCK]><![endif]-->\n</td>\n                        </tr>\n                    <!--[if ENDBLOCK]><![endif]-->\n                </tbody>\n</table>\n\n            <!--[if BLOCK]><![endif]--><!--[if ENDBLOCK]><![endif]-->\n        <!--[if ENDBLOCK]><![endif]-->\n        <div x-ref=\"fade\" class=\"h-6 origin-bottom fixed bottom-0 left-0 right-0 bg-gradient-to-t from-white dark:from-gray-900 pointer-events-none\" wire:ignore></div>\n    </div>\n</div>\n</section>\n"

something like this one?

timacdonald commented 3 months ago

Sorry, I think that might be the response for the Pulse dashboard.

I meant to ask for the response of one of those validation errors? i.e., what does the returned payload look like for a validation error on the /api/password/reset endpoint look like?

syofyanzuhad commented 3 months ago

Sorry, I think that might be the response for the Pulse dashboard.

I meant to ask for the response of one of those validation errors? i.e., what does the returned payload look like for a validation error on the /api/password/reset endpoint look like?

oohh i see, i think it return the default validation of laravel

this is the controller looks like:

image image
timacdonald commented 3 months ago

Can you share the contents of your app/Exceptions/Handler.php if you have one?

Just want to see any customisations to the response payload for exceptions.

syofyanzuhad commented 3 months ago

Can you share the contents of your app/Exceptions/Handler.php if you have one?

Just want to see any customisations to the response payload for exceptions.

u right! i use this package to handle it: https://github.com/flugg/laravel-responder?tab=readme-ov-file#option-2-use-convertsexceptions-trait

image
timacdonald commented 3 months ago

I introduced a new event you can dispatch to report validation errors when you are customising the response.

Checkout the docs and let me know if you have any issues (or even better if it works!): https://github.com/timacdonald/pulse-validation-errors?tab=readme-ov-file#capture-validation-errors-for-custom-response-formats