Attribute “value” is required in “input(checkbox)” tags when binding to non-boolean values

  • A+
所属分类:Spring

thymeleaf用th:field绑定checkbox时报下面的错

Attribute "value" is required in "input(checkbox)" tags when binding to non-boolean values

正如字面意思所说,checkbox 如果绑定的是一个非boolean型时要加上value属性,把字段类型改成boolean型即可。

ZPY

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: