@NonNull protected static List<RaveError> checkStringDef(boolean isNullable,@NonNull ValidationContext validationContext,@Nullable String value,String... acceptableValues){
  List<RaveError> errors=checkNullable(value,isNullable,validationContext);
  if (value == null) {
    return errors;
  }
  for (  String string : acceptableValues) {
    if (value.equals(string)) {
      return Collections.<RaveError>emptyList();
    }
  }
  return createStringDefError(value,acceptableValues,validationContext);
}

@ NonNull protected static List < RaveError > checkStringDef ( boolean isNullable , @ NonNull ValidationContext validationContext , @ Nullable String value , String ... acceptableValues ) { List < RaveError > errors = checkNullable ( value , isNullable , validationContext ) ; if ( value == null ) { return errors ; } for ( String string : acceptableValues ) { if ( value . equals ( string ) ) { return Collections . < RaveError > emptyList ( ) ; } } return createStringDefError ( value , acceptableValues , validationContext ) ; }
utility to check if a string is present in a list of strings . if the string is null then do nothing .
