Render validation message in data attribute

33 views
Skip to first unread message

Erik Dahlstrand

unread,
Dec 11, 2015, 10:42:57 AM12/11/15
to SimpleForm

Hi,

I'm evaluating the Materialize CSS framework. The framework expect the validation error message to be in a data attribute in the label. Is this possible to do with simple_form and wrapper config?

<label for="email" data-error="not an email">Email</label>

Regards, Erik

Carlos Antonio da Silva

unread,
Dec 19, 2015, 11:21:32 AM12/19/15
to plataformate...@googlegroups.com
I believe you won't be able to do with the wrapper config, but you might be able to write a patch on top of the label component that includes that data attribute for you.

Hope that helps.

--
You received this message because you are subscribed to the Google Groups "SimpleForm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-simp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
At.
Carlos Antonio
Reply all
Reply to author
Forward
0 new messages