F
Filament14mo ago
Divine

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 Wiebe14mo ago
Did you figure this out? I'm having the same issue.
Shaung Bhone
Shaung Bhone14mo ago
I think you need to update the filament version.
Adnan Yalahow
Adnan Yalahow14mo ago
I have the same problem and am using v.3
krekas
krekas14mo ago
which exact version of filament? run the php artisan about
Frank Wiebe
Frank Wiebe14mo ago
I'm using filament v3.0.73
krekas
krekas14mo ago
Try upgrading

Did you find this page helpful?