code: public ValidationData ruleSync(List<ValidationRule> rules) {
          List<ValidationRule> ruleList = new ArrayList<>();
  
          rules.forEach(rule -> {
              ValidationRule existRule = this.getExistRule(rule);
              ruleList.add(existRule != null ? existRule : rule);
          });
  
          this.validationRules.removeAll(ruleList);
          this.tempRules.addAll(this.validationRules);
  
          this.validationRules = ruleList;
          this.validationRules.sort(new RuleSorter());
  
          return this;
      }
docs: Rule sync validation data.
  
  @param rules the rules
  @return the validation data