is there a way to use javax.validation to validate a variable of type string called colour that needs to have these values only(red, blue, green, pink) using annotations?
i have seen @size(min=1, max=25)
and @notnull
but is there something like this @In(red, blue, green, pink)
more or less similar to the In-keyword
used in mysql