Inserting html to validation message

Just wondering if this is already possible to filament v3? Currently I'm using Placeholder for this to work
Placeholder::make('email_message')
->disableLabel()
->content(new HtmlString('This email already exists. <a href="/forgot">Forgot password?</a>')),
Placeholder::make('email_message')
->disableLabel()
->content(new HtmlString('This email already exists. <a href="/forgot">Forgot password?</a>')),
Is there a way that a $fail can be html?
TextInput::make('email')
->label('')
->markAsRequired(false)
->validationAttribute('email')
->placeholder('Email address')
->lazy()
->autofocus()
->required()
->rules([
fn (): Closure => function (string $attribute, $value, Closure $fail) {
if (!User::where('email', $value)->exists()) {
$fail('This email does not exist from our records.');
}
},
]),
TextInput::make('email')
->label('')
->markAsRequired(false)
->validationAttribute('email')
->placeholder('Email address')
->lazy()
->autofocus()
->required()
->rules([
fn (): Closure => function (string $attribute, $value, Closure $fail) {
if (!User::where('email', $value)->exists()) {
$fail('This email does not exist from our records.');
}
},
]),
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server