title: Thymeleaf - custom attribute
body: <p>I need to set custom attribute (data-validation-matches-message) value from messages resources.</p>
  
  <pre><code>&lt;input data-validation-matches-message="Text from messages resources" /&gt;
  </code></pre>
  
  <p>I can receive and print messages resources value as:</p>
  
  <pre><code>&lt;p th:text="#{user.notfound}"&gt;&lt;/p&gt;
  </code></pre>
  
  <p>But how I can set this value for a custom attribute (data-validation-matches-message)?</p>
  
  <p><strong>UPD</strong> (I use this)</p>
  
  <pre><code>&lt;input th:attr="data-validation-matches-message=#{user.notfound}"/&gt;
  </code></pre>