code: public void setValidationGroups(String validationGroups) {
  
          clearInitialState();        
          String newValidationGroups = validationGroups;
          
          // treat empty list as null
          if (newValidationGroups != null && newValidationGroups.matches(EMPTY_VALIDATION_GROUPS_PATTERN)) {
              newValidationGroups = null;
          }
          
          // only clear cache of validation group classes if value is changing
          if (newValidationGroups == null && validationGroups != null) {
              cachedValidationGroups = null;
          }
          
          if (newValidationGroups != null && validationGroups != null && !newValidationGroups.equals(validationGroups)) {
              cachedValidationGroups = null;
          }
          
          if (newValidationGroups != null && validationGroups == null) {
              cachedValidationGroups = null;
          }
          
          this.validationGroups = newValidationGroups;
      }
docs: <p class="changed_added_2_0">A comma-separated list of validation
  groups which are used to filter which validations get checked by
  this validator. If the validationGroupsArray attribute is omitted or
  is empty, the validation groups will be inherited from the branch
  defaults or, if there are no branch defaults, the {@link
  javax.validation.groups.Default} group will be used.</p>
  
  @param validationGroups comma-separated list of validation groups
  (string with only spaces and commas treated as null)