1, register-1.html
<form action= "Addguest" th:object= "${guestform}" method= "Post" class= "Form-horizontal" > <div class= "Form-group" ><span><label class= "col-sm-4 Control-label "> User id:<span style=" display:inline;color:red; " >*</span></label></span> <div class= "Col-sm-8" ><span>< Input name= "Guestid" type= "text" th:value= "${guestform.guestid}" class= "Form-control"/> </span><i class= "Red" style= "Font-size:medium" th:errors= "${guestform.guestid}" > </i><span class= "Red" style= "Font-size:medium" th:text= "${message}" > </span> </div> </div> <div class= "Form-group" ><span><label class= "Col-sm-4 control-label" > Password: <span style= "display:inline; color:red; " >*</span></label></span> <div class= "col-sm-8" ><span><input name= "password" type= "password" class= "Form-control "/></span><i class=" Red " style=" Font-size:medium " th:errors=" ${guestForm.password} " ></i> </div> </div> <div class= "Form-group" ><span><label class= "Col-sm-4 control-label" > Gender </label> </span> <div class= "Col-sm-8" ><select class= "Form-control" name= "gender" ><option value= "male" > Male </option> <option value= "female" > Female </ option></select></div> </div> <div class= "Form-group" ><div class= "col-sm-offset-2 col-sm-10" > <button type= "Submit" class= "Btnyellow yh" > Submit </button></div > </div></form>
The following statement is used to display the validation information
<i class= "Red" style= "Font-size:medium" th:errors= "${guestform.guestid}" ></i>
2, follow-up operation Reference-display verification information introduction
including validation gustform
8-14 QR Code Promotion page