monzer
TextInputColumn custom validation error
Tables\Columns\TextInputColumn::make('baseShopItem.discount_price')
->label(__('validation.attributes.discount_price'))
->toggleable()
->rules([
fn (Forms\Get $get): \Closure => function (string $attribute, $value, \Closure $fail) use ($get) {
if ($get('baseShopItem.price') > $value) {
$fail("The {$attribute} is invalid.");
}
},
])
->extraInputAttributes(['class' => 'min-w-[68px]']),
i am getting.
App\Filament\Resources{closure}(): Argument #1 ($get) must be of type Filament\Forms\Get, string given
4 replies