How to use the @rxweb/reactive-form-validators.RxwebValidators.numeric function in @rxweb/reactive-form-validators

To help you get started, we’ve selected a few @rxweb/reactive-form-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 rxweb / rxweb / test / reactive-form-validators / validator / numeric.validator.spec.ts View on Github external
() => {
            let formBuilder = new FormBuilder();
            let formGroup = formBuilder.group({
              'dataType': 'Integer',
              'integerNumber': -15
            });
            expect(RxwebValidators.numeric({ acceptValue:NumericValueType.PositiveNumber,conditionalExpression: (x, y) => x.dataType == "Integer" })(formGroup.controls.integerNumber)).toEqual({ 'numeric': { message: 'Enter a valid numeric digit.', refValues: [-15] } }); 
          });
github rxweb / rxweb / rxweb.io / src / assets / examples / reactive-form-validators / validators / numeric / add / numeric-add.component.ts View on Github external
ngOnInit() {
        this.userInfoFormGroup = this.formBuilder.group({
            integerNumber:['', RxwebValidators.numeric({acceptValue:NumericValueType.PositiveNumber  ,allowDecimal:false })], 
        });
    }
}
github rxweb / rxweb / rxweb.io / src / assets / examples / reactive-form-validators / validators / numeric / conditionalExpression / numeric-conditional-expression.component.ts View on Github external
ngOnInit() {
        this.userInfoFormGroup = this.formBuilder.group({
            dataType:['',], 
            realNumber:['', RxwebValidators.numeric({acceptValue:NumericValueType.Both  ,conditionalExpression:'x => x.dataType == "Real"' })], 
            integerNumber:['', RxwebValidators.numeric({acceptValue:NumericValueType.PositiveNumber  ,conditionalExpression:(x,y) => x.dataType == "Positive"  })], 
        });
    }
}
github rxweb / rxweb / rxwebio / src / assets / examples / reactive-form-validators / validators / numeric / acceptValue / numeric-accept-value.component.ts View on Github external
ngOnInit() {
        this.userInfoFormGroup = this.formBuilder.group({
            negativeNumber:['', RxwebValidators.numeric({acceptValue:NumericValueType.NegativeNumber })], 
        });
    }
}
github rxweb / rxweb / rxwebio / src / assets / examples / reactive-form-validators / validators / numeric / allowDecimal / numeric-allow-decimal.component.ts View on Github external
ngOnInit() {
        this.userInfoFormGroup = this.formBuilder.group({
            decimalNumber:['', RxwebValidators.numeric({allowDecimal:true })], 
        });
    }
}
github rxweb / rxweb / rxwebio / src / assets / examples / reactive-form-validators / validators / numeric / message / numeric-message.component.ts View on Github external
ngOnInit() {
        this.userInfoFormGroup = this.formBuilder.group({
            positiveNumber:['', RxwebValidators.numeric({message:'{{0}} is not a positive number' })], 
        });
    }
}
github rxweb / rxweb / rxweb.io / src / assets / examples / reactive-form-validators / validators / numeric / allowDecimal / numeric-allow-decimal.component.ts View on Github external
ngOnInit() {
        this.userInfoFormGroup = this.formBuilder.group({
            negativeNumber:['', RxwebValidators.numeric({acceptValue:NumericValueType.NegativeNumber  ,allowDecimal:true  ,message:'{{0}} is not a negative number' })], 
        });
    }
}
github rxweb / rxweb / rxweb.io / src / assets / examples / reactive-form-validators / validators / numeric / message / numeric-message.component.ts View on Github external
ngOnInit() {
        this.userInfoFormGroup = this.formBuilder.group({
            negativeNumber:['', RxwebValidators.numeric({acceptValue:NumericValueType.NegativeNumber  ,message:'{{0}} is not a negative number' })], 
        });
    }
}

@rxweb/reactive-form-validators

[![Build Status](https://dev.azure.com/ajayojha/rxweb/_apis/build/status/rxweb-CI?branchName=master)](https://dev.azure.com/ajayojha/rxweb/_build/latest?definitionId=39&branchName=master) [![Gitter](https://badges.gitter.im/rx-web/Lobby.svg)](https://git

MIT
Latest version published 1 year ago

Package Health Score

57 / 100
Full package analysis