Skip to content

Commit 4c5cc4a

Browse files
scott graysonscott grayson
authored andcommitted
Add live validation to tag name input
- Add live(onBlur: true) to trigger validation when user leaves the field - This ensures validation errors are displayed in real-time - Validation will show immediately when a duplicate tag name is detected
1 parent 2423bba commit 4c5cc4a

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/Resources/Pages/EditFile.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function form(\Filament\Schemas\Schema $schema): \Filament\Schemas\Schema
5454
\Filament\Forms\Components\TextInput::make('name')
5555
->required()
5656
->maxLength(255)
57+
->live(onBlur: true)
5758
->rules([
5859
function ($attribute, $value, $fail) {
5960
if (empty($value)) {

src/Resources/Pages/EditFolder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function form(\Filament\Schemas\Schema $schema): \Filament\Schemas\Schema
3838
\Filament\Forms\Components\TextInput::make('name')
3939
->required()
4040
->maxLength(255)
41+
->live(onBlur: true)
4142
->rules([
4243
function ($attribute, $value, $fail) {
4344
if (empty($value)) {

src/Resources/Pages/EditLink.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function form(\Filament\Schemas\Schema $schema): \Filament\Schemas\Schema
4242
\Filament\Forms\Components\TextInput::make('name')
4343
->required()
4444
->maxLength(255)
45+
->live(onBlur: true)
4546
->rules([
4647
function ($attribute, $value, $fail) {
4748
if (empty($value)) {

0 commit comments

Comments
 (0)