Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
() => {
let formBuilder = new FormBuilder();
let formGroup = formBuilder.group({
'firstName':['Mukesh'],
'middleName':'Mukesh'
});
expect(RxwebValidators.different({fieldName:'firstName',message:'{{0}} is same as firstName'})(formGroup.controls.middleName)).toEqual({'different':{ message: 'Mukesh is same as firstName', refValues: [ 'Mukesh','Mukesh' ] } });
});
ngOnInit() {
this.accountInfoFormGroup = this.formBuilder.group({
firstName:['',],
password:['', RxwebValidators.different({fieldName:"firstName" ,message:'{{0}} is same as firstName' })],
lastName:['', RxwebValidators.different({fieldName:"firstName" ,conditionalExpression:(x,y) => x.firstName == "Bharat" })],
userName:['', RxwebValidators.different({fieldName:"firstName" ,conditionalExpression:'x => x.firstName == "Bharat"' })],
});
}
}
ngOnInit() {
this.accountInfoFormGroup = this.formBuilder.group({
firstName:['',],
userName:['', RxwebValidators.different({fieldName:"firstName" ,conditionalExpression:'x => x.firstName == "Bharat"' })],
lastName:['', RxwebValidators.different({fieldName:"firstName" ,conditionalExpression:(x,y) => x.firstName == "Bharat" })],
});
}
}
ngOnInit() {
this.accountInfoFormGroup = this.formBuilder.group({
firstName:['',],
userName:['', RxwebValidators.different({fieldName:"firstName" ,conditionalExpression:'x => x.firstName == "Bharat"' })],
lastName:['', RxwebValidators.different({fieldName:"firstName" ,conditionalExpression:(x,y) => x.firstName == "Bharat" })],
});
}
}
ngOnInit() {
this.accountInfoFormGroup = this.formBuilder.group({
firstName:['',],
userName:['', RxwebValidators.different({fieldName:"firstName" ,conditionalExpression:'x => x.firstName == "Bharat"' })],
password:['', RxwebValidators.different({fieldName:"firstName" ,message:'{{0}} is same as firstName' })],
});
}
}
ngOnInit() {
this.accountInfoFormGroup = this.formBuilder.group({
firstName:['',],
userName:['', RxwebValidators.different({fieldName:"firstName" ,conditionalExpression:'x => x.firstName == "Bharat"' })],
password:['', RxwebValidators.different({fieldName:"firstName" ,message:'{{0}} is same as firstName' })],
});
}
}
ngOnInit() {
this.accountInfoFormGroup = this.formBuilder.group({
firstName:['',],
lastName:['', RxwebValidators.different({fieldName:"firstName" })],
});
}
}
ngOnInit() {
this.accountInfoFormGroup = this.formBuilder.group({
firstName:['',],
lastName:['', RxwebValidators.different({fieldName:'firstName' })],
middleName:['', RxwebValidators.different({fieldName:'firstName' ,message:'{{0}} is same as firstName' })],
});
}
}
ngOnInit() {
this.accountInfoFormGroup = this.formBuilder.group({
firstName:['',],
lastName:['', RxwebValidators.different({fieldName:"firstName" })],
});
}
}
ngOnInit() {
this.accountInfoFormGroup = this.formBuilder.group({
firstName:['',],
lastName:['', RxwebValidators.different({fieldName:'firstName' })],
});
}
}