How to use the ngx-custom-validators.CustomValidators.json function in ngx-custom-validators

To help you get started, we’ve selected a few ngx-custom-validators examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phucan1108 / letportal / src / web-portal / src / app / modules / portal / modules / render / components / standard / components / divided-columns-section.component.ts View on Github external
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
github NarikMe / narik-angular / projects / narik-core / src / lib / services / narik-validation.service.ts View on Github external
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"]