Spring Boot class Size not found @Size(min=1,max=18)
<p>I have a <code>User</code> class as below and I am trying to enforce validation and I am getting an: </p>

<blockquote>
  <p>error cannot find symbol symbol:   class Size</p>
</blockquote>

<p>My class looks something like this:</p>

<pre><code>import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class User {

    @Id
    private long id;
    @Size(min=1,max=18)
    private int age;

    // getters and setters

}
</code></pre>