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
->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
