How to use the @rxweb/reactive-form-validators.RxwebValidators.compare 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 / compare.validator.spec.ts View on Github external
() => {
          let formBuilder = new FormBuilder();
          let formGroup = formBuilder.group({
			'password':['User@123'],
            'confirmPassword':'user@123'
          });
          expect(RxwebValidators.compare({fieldName:'password',message:'You must enter same password'})(formGroup.controls.confirmPassword)).toEqual({'compare':{ message: 'You must enter same password', refValues: [ 'user@123','User@123' ] } }); 
        });
github rxweb / rxweb / rxwebio / src / assets / examples / reactive-form-validators / validators / compare / fieldName / compare-field-name.component.ts View on Github external
ngOnInit() {
        this.userFormGroup = this.formBuilder.group({
            email:['',], 
            confirmEmail:['', RxwebValidators.compare({fieldName:'email' })], 
        });
    }
}
github rxweb / rxweb / rxweb.io / src / assets / examples / reactive-form-validators / validators / compare / fieldName / compare-field-name.component.ts View on Github external
ngOnInit() {
        this.userFormGroup = this.formBuilder.group({
            password:['',], 
            confirmPassword:['', RxwebValidators.compare({fieldName:'password'  ,message:'Both Input is not matched' })], 
        });
    }
}
github rxweb / rxweb / rxwebio / src / app / components / home / home.component.ts View on Github external
ngOnInit(): void {
    this.isLoggedIn = false;
    if (localStorage.getItem('isLoggedIn') === 'true') {
      this.isLoggedIn = true;
    }
    this.applicationBroadcast.urlBroadCast(true);
    this.userFormGroup = this.formBuilder.group({
      password: ['',],
      confirmPassword: ['', RxwebValidators.compare({ fieldName: 'password' })],
    });
    this.userForm = this.formBuilder.group({
      country:[''],
      identityNumber:['',RxwebValidators.required({conditionalExpression:(x) => x.country == 'India' })]
    });
    this.user = new User();
    this.userInfoFormGroup = this.rxFormBuilder.formGroup(this.user);
    this.http.get('assets/json/home.json?v='+environment.appVersion).subscribe((response:object) => {
        this.codeContent = response;
    this.http.get('assets/json/dynamic-validation.json?v='+environment.appVersion).subscribe((dynamicValidationConfiguration:any) => {
      
        this.userModelFormGroup = this.rxFormBuilder.group({
          firstName:['Bharat']
        },
        new FormBuilderConfiguration( { dynamicValidation: dynamicValidationConfiguration }));
        this.showComponent= true;
github rxweb / rxweb / rxweb.io / src / assets / examples / reactive-form-validators / validators / compare / complete / compare-complete.component.ts View on Github external
ngOnInit() {
        this.userFormGroup = this.formBuilder.group({
            password:['',], 
            confirmPassword:['', RxwebValidators.compare({fieldName:'password'  ,message:'Both Input is not matched' })], 
        });
    }
}
github rxweb / rxweb / rxweb.io / src / app / components / home / home.component.ts View on Github external
ngOnInit(): void {
    this.userFormGroup = this.formBuilder.group({
      password: ['',],
      confirmPassword: ['', RxwebValidators.compare({ fieldName: 'password' })],
    });
    this.userForm = this.formBuilder.group({
      country:[''],
      identityNumber:['',RxwebValidators.required({conditionalExpression:(x) => x.country == 'India' })]
    });
    this.user = new User();
    this.userInfoFormGroup = this.rxFormBuilder.formGroup(this.user);
    this.http.get('assets/json/home.json').subscribe((response:object) => {
        this.codeContent = response;
    this.http.get('assets/json/dynamic-validation.json').subscribe((dynamicValidationConfiguration:any) => {
      
        this.userModelFormGroup = this.rxFormBuilder.group({
          firstName:['Bharat']
        },
        new FormBuilderConfiguration( { dynamicValidation: dynamicValidationConfiguration }));
        this.showComponent= true;
github rxweb / rxweb / rxweb.io / src / assets / examples / reactive-form-validators / validators / compare / message / compare-message.component.ts View on Github external
ngOnInit() {
        this.userFormGroup = this.formBuilder.group({
            password:['',], 
            confirmPassword:['', RxwebValidators.compare({fieldName:'password'  ,message:'Both Input is not matched' })], 
        });
    }
}
github rxweb / rxweb / rxwebio / src / assets / examples / reactive-form-validators / validators / compare / message / compare-message.component.ts View on Github external
ngOnInit() {
        this.userFormGroup = this.formBuilder.group({
            password:['',], 
            confirmPassword:['', RxwebValidators.compare({fieldName:'password'  ,message:'You must enter same password' })], 
        });
    }
}
github rxweb / rxweb / rxweb.io / src / assets / examples / reactive-form-validators / validators / compare / add / compare-add.component.ts View on Github external
ngOnInit() {
        this.userFormGroup = this.formBuilder.group({
            password:['',], 
            confirmPassword:['', RxwebValidators.compare({fieldName:'password' })], 
        });
    }
}
github rxweb / rxweb / rxwebio / src / assets / examples / reactive-form-validators / validators / compare / complete / compare-complete.component.ts View on Github external
ngOnInit() {
        this.userFormGroup = this.formBuilder.group({
            email:['',], 
            confirmEmail:['', RxwebValidators.compare({fieldName:'email' })], 
            password:['',], 
            confirmPassword:['', RxwebValidators.compare({fieldName:'password'  ,message:'You must enter same password' })], 
        });
    }
}

@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