F
Filament12mo 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
VpOP12mo ago
bump
Umar Farooq
Umar Farooq10mo ago
workaround?

Did you find this page helpful?