简体   繁体   中英

Spring Boot example for @NotEmpty annotaion

I am developing spring boot application which has freemarker for UI. I want to use @NotEmpty annotation for radio button. eg "input type="radio"

I can see examples on internet but they are with form tag(spring tag).

Can someone give me example for above without form tag.

You can use

<@spring.formRadioButtons "x.y"/>
<@spring.showErrors "<br>"/> 

to display the validation messages.

Have a look at this tutorial:

https://hellokoding.com/form-data-binding-and-validation-example-with-java-spring-boot-and-freemarker/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM