is it possible to make maxvalue in texinput dependant based on select?

i want to achieve that max value from text input can change depend on how many qty left in stock from 'asset_id', so when the user select specific 'asset_id', max value 'to_use' field is change depend on what user select Thank you for your help!
Select::make('asset_id')
TextInput::make('to use')
->numeric()
->minValue(1)
->maxValue(get qty from select asset_id)
Select::make('asset_id')
TextInput::make('to use')
->numeric()
->minValue(1)
->maxValue(get qty from select asset_id)
1 Reply
Expecto Patronum
Hi. You can implement custom rule at the textinput field . You can refer on this documentation .
No description
Want results from more Discord servers?
Add your server