title: Thymeleaf Error for <input> date with th:pattern
body: <p>I'm trying to use <code>th:pattern</code> for date input form field like following for a <em>thymeleaf</em> template using <em>spring-mvc</em> but without luck. Anybody else experienced similar thing and has some insight or alternative? </p>
  
  <p><strong>I tried 1</strong>. hard-coding the pattern   </p>
  
  <p><code>&lt;input type="text" th:pattern="MM/dd/yyyy" th:field="*{classDate}"/&gt;</code></p>
  
  <p>received Error:</p>
  
  <pre><code>Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "MM/dd/yyyy" 
  </code></pre>
  
  <p><strong>And 2</strong>. setting pattern in java code for template to use   </p>
  
  <p><code>&lt;input type="date" th:pattern="${classdate_format}" th:field="*{classDate}"/&gt;</code>   </p>
  
  <p>received Error:</p>
  
  <pre><code>Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateProcessingException: Error during execution of processor 'org.thymeleaf.spring3.processor.attr.SpringInputGeneralFieldAttrProcessor'
  </code></pre>