-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor not showing red outline on validation error #940
Comments
@orchidcode thanks for reporting! I've just tested this and yeah the red error border isn't showing up. The reason for this is the Volt component that demonstrates the issue. <?php
use Livewire\Attributes\Validate;
use Livewire\Volt\Component;
new class extends Component {
#[Validate(['required'])]
public $content;
public function save()
{
$this->validate();
}
};
?>
<div>
<flux:editor label="Editor" wire:model.live="content" />
<flux:button wire:click="save" />
</div> |
Ahh good catch, I think we can move wire:ignore to the editor.content component solely to fix this issue. thanks |
I've submitted a PR with a fix for this! PR description below. The scenarioCurrently the editor component won't show the red border when a validation error has occurred. <?php
use Livewire\Attributes\Validate;
use Livewire\Volt\Component;
new class extends Component {
#[Validate(['required'])]
public $content;
public function save()
{
$this->validate();
}
};
?>
<div>
<flux:editor label="Editor" wire:model.live="content" />
<flux:button wire:click="save" />
</div> The problemThe reason the outline is not being shown is because the The solutionTo fix this, we thought we could just just move the But that causes the toolbar to break when it re-renders. So I've had to add |
Flux version
v1.1.2
Livewire version
v3.5.12
What is the problem?
When flux:editor has a validation error, the error is properly displayed (in red) below the editor but the editor is not getting the red outline. Also, when :invalid property is set dynamically, the outline does not show however when hardcoded it works properly.
Code snippets
How do you expect it to work?
This works as expected (when :invalid is hardcoded).
Please confirm (incomplete submissions will not be addressed)
The text was updated successfully, but these errors were encountered: