How to use th:oninvalid

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to use th:oninvalid

julie
Hi

I wrote html code below.
<... oninvalid=“this.setCustomValidity(‘this is wrong msg’)”>

Now,I want to use messages.properties for the message,
but can’t find how to use it.
I tried many codes, all failed.
ex)
<... th:oninvalid=“this.setCustomValidity(#{message.wrong})>

or

<... th:oninvalid=“this.setCustomValidity(${#messages(message.wrong)})>

Is there anybody who knows about this?

thank you.