F
Filament6mo ago
Vp

validation message in rules not working

I have this below code, but my custom validation message cannot trigger, it showing default laravel validation.
Forms\Components\FileUpload::make('cover')
->required()
->rules([
'dimensions:ratio=2/1',
])
->validationMessages([
'dimensions' => 'Error !!!',
])
Forms\Components\FileUpload::make('cover')
->required()
->rules([
'dimensions:ratio=2/1',
])
->validationMessages([
'dimensions' => 'Error !!!',
])
Can we override rules validation message as well using ->validationMessages()?
2 Replies
Vp
Vp6mo ago
bump
Umar Farooq
Umar Farooq4mo ago
workaround?