@AssertTrue of javax.validation - isn't it supposed to create an error message?

两盒软妹~` 提交于 2020-01-24 06:37:33

问题


I am having the following code in a Spring-MVC command bean:

@AssertTrue
public boolean isConditionTrue() {
    return false;
}

private boolean conditionTrue;

My JSP contains the following:

<form:errors path="conditionTrue" cssClass="error" />

I would expect to see some error message in the produced HTML... however I see no error message. What do I miss?

Thanks!!!

来源:https://stackoverflow.com/questions/7155767/asserttrue-of-javax-validation-isnt-it-supposed-to-create-an-error-message

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!