# validationRulesFromJson function

List<ValidationRule> validationRulesFromJson(

1. List json

)

## Implementation

    List<ValidationRule> validationRulesFromJson(List<dynamic> json) {
      return json.map((e) {
        String validationType = e["validationType"];
        switch (validationType) {
          case ValidationType.expirationDateKey:
            return ValidationRuleExpirationDate.fromJson(e);
          case ValidationType.emailAddressKey:
            return ValidationRuleEmailAddress.fromJson(e);
          case ValidationType.fixedListKey:
            return ValidationRuleFixedList.fromJson(e);
          case ValidationType.ibanKey:
            return ValidationRuleIBAN.fromJson(e);
          case ValidationType.lengthKey:
            return ValidationRuleLength.fromJson(e);
          case ValidationType.luhnKey:
            return ValidationRuleLuhn.fromJson(e);
          case ValidationType.rangeKey:
            return ValidationRuleRange.fromJson(e);
          case ValidationType.regularExpressionKey:
            return ValidationRuleRegularExpression.fromJson(e);
          case ValidationType.termsAndConditionsKey:
            return ValidationRuleTermsAndConditions.fromJson(e);
          default:
            return ValidationRule(ValidationType.type, "validationRule");
        }
      }).toList();
    }