How to use the ngx-custom-validators.CustomValidators.number 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 NarikMe / narik-angular / projects / narik-core / src / lib / services / narik-validation.service.ts View on Github external
params: ["maxDate"]
    },
    minDate: {
      func: CustomValidators.minDate,
      params: ["minDate"]
    },
    notEqual: {
      func: CustomValidators.notEqual,
      params: ["notEqual"]
    },
    notEqualTo: {
      func: CustomValidators.notEqualTo,
      params: ["notEqualTo"]
    },
    number: {
      func: CustomValidators.number
    },
    range: {
      func: CustomValidators.range,
      params: ["range"]
    },
    rangeLength: {
      func: CustomValidators.rangeLength,
      params: ["rangeLength"]
    },
    url: {
      func: CustomValidators.url
    },
    uuid: {
      func: CustomValidators.uuid
    }
  };
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(Validators.required)
                        break
                    case ValidatorType.Equal:
                        formValidators.push(CustomValidators.equal(JSON.parse(validator.validatorOption)))
                        break
                    case ValidatorType.EqualTo:
                        const foundEqualToControl = availableControls[validator.validatorOption]
                        if (!!foundEqualToControl) {
                            formValidators.push(CustomValidators.equalTo(foundEqualToControl))
                        }
                        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