Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
break
case ValidatorType.Email:
formValidators.push(CustomValidators.email)
break
case ValidatorType.Number:
formValidators.push(CustomValidators.number)
break
case ValidatorType.NumberRange:
formValidators.push(CustomValidators.range(JSON.parse(validator.validatorOption)))
break
case ValidatorType.DateTime:
formValidators.push(CustomValidators.date)
break
case ValidatorType.MinDate:
formValidators.push(CustomValidators.minDate(validator.validatorOption))
break
case ValidatorType.MaxDate:
formValidators.push(CustomValidators.maxDate(validator.validatorOption))
break
case ValidatorType.Regex:
formValidators.push(Validators.pattern(validator.validatorOption))
break
case ValidatorType.MinLength:
formValidators.push(Validators.minLength(parseInt(validator.validatorOption)))
break
case ValidatorType.MaxLength:
formValidators.push(Validators.maxLength(parseInt(validator.validatorOption)))
break
case ValidatorType.Json:
formValidators.push(CustomValidators.json)
break