© 2026 Hedgehog Software, LLC

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

Numeric but can be blank

I have a form that includes the following
Forms\Components\TextInput::make('company_number')
    ->label('Company Number')
    ->numeric()
    ->nullable(),
Forms\Components\TextInput::make('company_number')
    ->label('Company Number')
    ->numeric()
    ->nullable(),


However, when I try to submit the form, if this field is left blank, I get the following validation error

The company Number field must be a number.

Is there a way to require the field to be numeric or blank?

Also as a slight aside, how do I capitalise the 'c' in the validation error?
image.png
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

ImportField nullable but numeric when not empty
FilamentFFilament / ❓┊help
3y ago
Table should be blank in default
FilamentFFilament / ❓┊help
3y ago
Numeric format issue
FilamentFFilament / ❓┊help
3y ago
textinput numeric inside wizard still can type 'e'
FilamentFFilament / ❓┊help
3y ago