F
Filament7mo ago
Numine

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