F
Filament15mo ago
Zaq

I am unable to use this function : validationMessages() to validate my text input.

Sample of code failing:
TextInput::make('someValue')
->label('someLabel')
->integer()
->validationMessages([
'integer' => 'The :attribute value should be Integer.',
])
->required(),
TextInput::make('someValue')
->label('someLabel')
->integer()
->validationMessages([
'integer' => 'The :attribute value should be Integer.',
])
->required(),
Error message: BadMethodCallException PHP 8.2.13 10.30.1 Method Filament\Forms\Components\TextInput::validationMessages does not exist.
6 Replies
Frank Wiebe
Frank Wiebe15mo ago
Did you figure this out? I'm having the same issue.
Shaung Bhone
Shaung Bhone15mo ago
I think you need to update the filament version.
Adnan Yalahow
Adnan Yalahow15mo ago
I have the same problem and am using v.3
krekas
krekas15mo ago
which exact version of filament? run the php artisan about
Frank Wiebe
Frank Wiebe15mo ago
I'm using filament v3.0.73
krekas
krekas15mo ago
Try upgrading

Did you find this page helpful?