F
Filament10mo ago
jaocero

How to customize validation rule message?

Hi, I want to customize the message of this particular rule but I can't find it in docs.
Forms\Components\Toggle::make('default')
->label('Make it the default color combination?')
->onColor('success')
->offColor('gray')
->exists(modifyRuleUsing: function (Exists $rule) {
return $rule->where('default', true);
})
->validationAttribute('default')
Forms\Components\Toggle::make('default')
->label('Make it the default color combination?')
->onColor('success')
->offColor('gray')
->exists(modifyRuleUsing: function (Exists $rule) {
return $rule->where('default', true);
})
->validationAttribute('default')
4 Replies
pocket.racer
pocket.racer10mo ago
interested in knowing this too
pocket.racer
pocket.racer10mo ago
i suppose u prob can but it would be nice if we don't have to resort to that just for changing the validation error message i guess
jaocero
jaocero10mo ago
Up