Skip to content
Brok UI

Loading…

No results

Lint UI-217

require-unsaved-guard

Forms with unsaved state need a navigation guard.

UI-217 default: warning livewire MISSING_UNSAVED_GUARD

Configure

In the lint.rules block of ui.json. It accepts message, exclude; see the policy for what the entries match.

ui.json JSON
"require-unsaved-guard": ["warning", { "message": "...", "exclude": ["resources/views/legacy/**"] }]
terminal
php artisan ui:check --explain require-unsaved-guard

Suppress one line

blade
{{-- ui-lint-disable-next-line require-unsaved-guard: reason --}}