Jquery验证插件验证,thymeleaf不起作用

Jquery验证插件验证,thymeleaf不起作用,jquery,thymeleaf,Jquery,Thymeleaf,由于th:field,我单击提交按钮时验证不起作用,但如果不使用它,th:field验证工作正常。所以请帮帮我 Html代码 <input class="input-text full-width" type="text" th:name="houseNo" th:field="*{billingInfo.houseNo}" th:id="houseNo" placeholder="House No" /> th:字段覆盖它所附加到的对象的名称和值属性。此外,如果尚未选择,它将生成

由于th:field,我单击提交按钮时验证不起作用,但如果不使用它,th:field验证工作正常。所以请帮帮我

Html代码

<input class="input-text full-width" type="text" th:name="houseNo" th:field="*{billingInfo.houseNo}" th:id="houseNo" placeholder="House No" />
th:字段覆盖它所附加到的对象的名称和值属性。此外,如果尚未选择,它将生成id

w/th:现场

因此,您需要更改javascript以匹配th:field正在执行的操作

<input class="input-text full-width" type="text" name="billingInfo.houseNo" id="houseNo" placeholder="House No" />

链接到java?显然没有人
<input class="input-text full-width" type="text" name="billingInfo.houseNo" id="houseNo" placeholder="House No" />
$("#review").validate({
    rules: {
        "billingInfo.houseNo": "required"
    },
    messages: {
        "billingInfo.houseNo": $("#houseN").text()
    },
    submitHandler: function(form) {
        alert("submit here");
        form.submit();
    }
});