开发者

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

开发者 https://www.devze.com 2023-03-30 03:39 出处:网络
I am having the following code in a Spring-MVC command bean: @AssertTrue public boolean isConditionTrue() {

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:

<开发者_Go百科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!!!

0

精彩评论

暂无评论...
验证码 换一张
取 消