【问题标题】:Thymeleaf - Form validation and error messagesThymeleaf - 表单验证和错误消息
【发布时间】:2015-10-13 12:44:23
【问题描述】:

一旦我们在文本框中键入并从文本框中移出,是否可以显示验证动态错误消息。 现在它可以在我们提交表单时显示验证错误消息。

【问题讨论】:

    标签: html thymeleaf


    【解决方案1】:

    只使用 Thymeleaf 是不可能的,因为字段内容是在服务器端验证的(在表单提交之后)。您可以在 html5 like here 中验证某些类型的内容。另一种更复杂但也更强大的方法是使用 AngularJS(example) 或 JQuery(another example)

    HTH

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-09-18
      • 1970-01-01
      • 1970-01-01
      • 2012-06-04
      • 2016-02-20
      • 2015-10-23
      • 2018-03-27
      • 2016-01-06
      相关资源
      最近更新 更多