title: adding a constraint to spring entity set field value to one of possible predefined values
body: <p>good day everyone,</p>
  
  <p>i'm currently working on a spring application for school project, it's about a form generator. anyway i have a question entity which has a field called type, i want that field to be one of 3 different values (radio which is the default, checkbox, or input) but i didn't know how to do this with hibernate annotations or even with the spring constraints annotations so i was hoping someone here has an idea on how to do this.</p>
  
  <p>thanks for your time everyone and hope you have a nice day.</p>