© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
ericmp #2

Set min value dinamically

i have 2 integer values to fill
first one must be not greather than the 2nd one
and 2nd one must be not smaller than 1st one

This is what im trying, but im missing something and idk what it is :/
Forms\Components\TextInput::make('min_int')
    ->live()
    ->numeric()
    ->rule('integer')
    ->inputMode('numeric')
,
Forms\Components\TextInput::make('max_int')
    ->live()
    ->numeric()
    ->rule('integer')
    ->inputMode('numeric')
    ->maxValue(function (Get $get) {
        return $get('min_int');
    })
,
Forms\Components\TextInput::make('min_int')
    ->live()
    ->numeric()
    ->rule('integer')
    ->inputMode('numeric')
,
Forms\Components\TextInput::make('max_int')
    ->live()
    ->numeric()
    ->rule('integer')
    ->inputMode('numeric')
    ->maxValue(function (Get $get) {
        return $get('min_int');
    })
,
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

TextInput min/maxValues not being set
FilamentFFilament / ❓┊help
6mo ago
Set value of key-value field
FilamentFFilament / ❓┊help
3y ago
colorpicker default value set
FilamentFFilament / ❓┊help
2y ago
Set default checkboxlist value
FilamentFFilament / ❓┊help
3y ago