createOptionForm field validation

as title says, I have createOptionForm (it happens with editOptionForm too) on my select, but the unique validation is not working, did I miss something, any help?
->createOptionForm([
    Forms\Components\TextInput::make('name')
        ->label('Region / District / Area / Neighborhood')
        ->placeholder('Add region / district / area / neighborhood')
        ->required()
        ->unique(ignoreRecord: true)
        ->maxLength(255),
    Forms\Components\Toggle::make('is_published')
        ->label('Published')
        ->onIcon('heroicon-s-check')
        ->onColor('success')
        ->default(true),
    Forms\Components\Toggle::make('is_verified')
        ->label('Verified')
        ->onIcon('heroicon-s-check')
        ->onColor('success')
        ->default(true),
])
Screenshot_2024-01-15_at_15.08.06.png
Was this page helpful?