FilamentF
Filament3y ago
Vp

numeric minValue still accepting negative value in input field

I am trying to use numeric and minValue like below, but as we can see from the video it still accept negative value.

If I set ->minValue(0) then I think I cannot see negative value in input or does my expectation is wrong?

My code:
Forms\Components\TextInput::make('vacancies')
    ->required()
    ->numeric()
    ->minValue(0)
    ->maxValue(1000),

Edit: Validation is working tho, it validate for zero, so what do I need to make input field not accepting negative value?
Was this page helpful?