How to use the @rxweb/reactive-form-validators.RxwebValidators.alpha 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 / services / conditional-expression.spec.ts View on Github external
it('should pass.', () => {
        let userFormGroup = formbuilder.group({
            firstName: ['@ja', RxwebValidators.alpha({ conditionalExpression: (x) => x.firstName == "@jay" })]
        })
        userFormGroup.controls.firstName.setValue('@jay');
        expect(userFormGroup.controls.firstName.errors).toEqual({ 'alpha': { message: 'Only alphabets are allowed.', refValues: ['@jay'] } });
    })
github rxweb / rxweb / test / reactive-form-validators / basic-examples / reactive-form-based-validation.spec.ts View on Github external
() => {
        expect(RxwebValidators.alpha()(new FormControl('Bharat'))).toBeNull();
      });
github rxweb / rxweb / test / reactive-form-validators / validator / alpha.validator.spec.ts View on Github external
() => {
                expect(RxwebValidators.alpha()(new FormControl(undefined))).toBeNull();
            });
        //end
github rxweb / rxweb / test / reactive-form-validators / validator / compose.validator.spec.ts View on Github external
() => {
          expect(RxwebValidators.compose({
            validators: [RxwebValidators.alpha()]
          })(new FormControl("India@"))).toEqual({ 'alpha': { message: 'only alphabets are allowed.', refValues: ['India@'] } })
        });
github rxweb / rxweb / rxwebio / src / assets / examples / reactive-form-validators / validators / alpha / allowWhiteSpace / alpha-allow-white-space.component.ts View on Github external
ngOnInit() {
        this.addressInfoFormGroup = this.formBuilder.group({
            stateName:['', RxwebValidators.alpha({allowWhiteSpace:true })], 
        });
    }
}
github rxweb / rxweb / rxwebio / src / assets / examples / reactive-form-validators / validators / alpha / add / alpha-add.component.ts View on Github external
ngOnInit() {
        this.countryFormGroup = this.formBuilder.group({
            countryName:['', RxwebValidators.alpha()], 
        });
    }
}
github rxweb / rxweb / rxwebio / src / assets / examples / howto / validators / errorMessages / complete / errormessage-complete.component.ts View on Github external
ngOnInit() {
        this.userFormGroup = this.formBuilder.group({
            userName:['', RxwebValidators.required()], 
              password : ['',[RxwebValidators.alpha(),RxwebValidators.password({ validation: { maxLength: 10, minLength: 5, digit: true, specialCharacter: true } })]],
        });
      
    }
}
github rxweb / rxweb / rxwebio / src / assets / examples / reactive-form-validators / validators / alpha / message / alpha-message.component.ts View on Github external
ngOnInit() {
        this.addressInfoFormGroup = this.formBuilder.group({
            stateCode:['', RxwebValidators.alpha({message:'You can enter only alphabets.' })], 
        });
    }
}
github rxweb / rxweb / rxwebio / src / assets / examples / reactive-form-validators / validators / alpha / complete / alpha-complete.component.ts View on Github external
ngOnInit() {
        this.addressInfoFormGroup = this.formBuilder.group({
            countryName:['', RxwebValidators.alpha()], 
            countryCode:['', RxwebValidators.alpha({conditionalExpression:(x,y) => x.countryName == "India" })], 
            cityName:['', RxwebValidators.alpha({conditionalExpression:'x => x.countryName =="India"' })], 
            stateName:['', RxwebValidators.alpha({allowWhiteSpace:true })], 
            stateCode:['', RxwebValidators.alpha({message:'You can enter only alphabets.' })], 
        });
    }
}
github rxweb / rxweb / rxweb.io / src / assets / examples / reactive-form-validators / validators / alpha / message / alpha-message.component.ts View on Github external
ngOnInit() {
        this.addressInfoFormGroup = this.formBuilder.group({
            stateCode:['', RxwebValidators.alpha({message:'You can enter only alphabets.' })], 
        });
    }
}

@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