Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
}
}
})
return formValidators
params: ["equal"]
},
equalTo: {
func: CustomValidators.equalTo,
params: ["equalTo"]
},
gt: {
func: CustomValidators.gt,
params: ["gt"]
},
gte: {
func: CustomValidators.gte,
params: ["gte"]
},
json: {
func: CustomValidators.json
},
lt: {
func: CustomValidators.lt,
params: ["lt"]
},
lte: {
func: CustomValidators.lte,
params: ["lte"]
},
maxDate: {
func: CustomValidators.maxDate,
params: ["maxDate"]
},
minDate: {
func: CustomValidators.minDate,
params: ["minDate"]