title: JHipster: jhi-alert-error element and server side form validation?
body: <p>I am using JHipster 3.3. In the generated "entity"-dialog.html, I noticed the tag <strong>jhi-alert-error</strong> element will display server validation error so for example if a field is mandatory as specified in entity JPA class like</p>
  
  <pre><code>    @NotNull
      private String name;
  </code></pre>
  
  <p>Then error message for that field will be returned after clicking the Submit button if value of the field is empty.</p>
  
  <p>So questions:</p>
  
  <ol>
  <li><p>How is <strong>jhi-alert-error</strong> implemented? I can't seem to see its implementation</p></li>
  <li><p>I tried tweaking JPA annotation to make a field unique BUT this time no error message will be displayed in <strong>jhi-alert-error</strong> if I break the unique constraint by adding 2 records having the same value for the field, 
  E.g.</p>
  
  <p>// note 'unique=true' below</p>
  
  <blockquote>
    <p>@NotNull
       @Column(name = "name", unique=true)<br>
    private String name;</p>
  </blockquote>
  
  <p>or</p></li>
  </ol>
  
  <blockquote>
    <p>@Table(name="Module", uniqueConstraints = @UniqueConstraint(columnNames = "Name"))
       public Class Module implements Serializable { ...</p>
  </blockquote>
  
  <p>So how would I go about implementing my own server side form validation so error messages will be displayed in <strong>jhi-alert-error</strong> when the unique constraint of a field is broken after clicking the Submit button?</p>
  
  <p>Thanks in advance,</p>