title: Form validation in thymeleaf by Springboot
body: <p>I am new to the Springboot and Thymeleaf, I am creating a web where i am using form validation where I am trying to validate fields from an entity class to validate non empty fields.</p>
  <pre><code>import javax.validation.constraints.NotBlank;
  
  public class Student {
  
  @NotBlank(message = &quot;Name required&quot;)
  public String name;
  @NotBlank(message = &quot;email required&quot;)
  public String email;
  @NotBlank(message = &quot;address required&quot;)
  public String address;
  @NotBlank(message = &quot;username required&quot;)
  public String username;
  @NotBlank(message = &quot;password required&quot;)
  public String password;
  
  '''
  constructor
  getter and setter
  '''
  }
  
  </code></pre>
  <p>It is not showing error in my html file, showing error on server.
  If any one has any idea please help me.</p>