spring thymeleaf remove quotes in validation message
<p>I am using Spring Thymeleaf and I have form validation messages in an external messages.properties file.</p>

<p>When I reference the message like this:</p>

<pre><code>th:attr="data-error=#{field.error.required.field}"
</code></pre>

<p>as in the following input field declaration:</p>

<pre><code>&lt;input class="form-control input-lg" type="text" th:field="*{firstName}"
       th:attr="data-error=#{field.error.required.field}" required="true"
       data-delay="100" placeholder="First name"/&gt;
</code></pre>

<p>When the validation message appears in the browser, it has quotation marks as below:</p>

<pre><code>"This is a required field"
</code></pre>

<p>How do I display the message without the quotation marks?</p>

<p>Here is some more code detail. The model object looks like:</p>

<pre><code>public class UserSession {

    @Email
    @NotEmpty
    @Size(min = 2, max = 255)
    private String email;
    ...
}
</code></pre>

<p>The form input looks like:</p>

<pre><code>&lt;div class="form-group" th:classappend="${#fields.hasErrors('email')} ? has-error"&gt;
    &lt;div class="input-group"&gt;
        &lt;span class="input-group-addon"&gt;&lt;span class="glyphicon glyphicon-user"&gt;&lt;/span&gt;&lt;/span&gt;
        &lt;input class="form-control input-lg" type="email" id="email"
               th:field="*{email}" th:attr="data-error=#{field.error.invalid.email}"
               required="true" data-delay="100" placeholder="Email"/&gt;
    &lt;/div&gt;
    &lt;div class="help-block with-errors" th:errors="*{email}"&gt;&lt;/div&gt;
    &lt;div class="help-block with-errors"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>When I remove the <code>data-error</code> attribute and bind the message to the model object property directly, I get the default errors and not my message.</p>