I think lte validator is not working

Forms\Components\Toggle::make('full_refund')
->columnSpan(2)
->reactive()
->afterStateUpdated(
function ($state, callable $set, RelationManager $livewire) {
$set('amount', round($livewire->ownerRecord->grand_total, 2));
}
),

Forms\Components\TextInput::make('amount')
->numeric()
->lte(function ($state, callable $set, RelationManager $livewire) {
return round($livewire->ownerRecord->grand_total, 2);
})
,

It has the same value round($livewire->ownerRecord->grand_total, 2) but it shows an error
5ab95c5dfe4a64a6749301f2cdaea924.png
Was this page helpful?