Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
() => {
expect(RxwebValidators.alphaNumeric({allowWhiteSpace:true})(new FormControl('Victoria@ Park'))).toEqual({ 'alphaNumeric': { message: 'Only alphanumerics are allowed.', refValues: ['Victoria@ Park'] } });
});
it('should error,allowWhiteSpace true and messageKey is defined.',
ngOnInit() {
this.locationFormGroup = this.formBuilder.group({
flatAddress:['', RxwebValidators.alphaNumeric({allowWhiteSpace:true })],
});
}
}
ngOnInit() {
this.locationFormGroup = this.formBuilder.group({
flatAddress:['', RxwebValidators.alphaNumeric({allowWhiteSpace:true })],
});
}
}
ngOnInit() {
this.locationFormGroup = this.formBuilder.group({
areaName:['', RxwebValidators.alphaNumeric()],
flatAddress:['', RxwebValidators.alphaNumeric({allowWhiteSpace:true })],
postalAddress:['', RxwebValidators.alphaNumeric({allowWhiteSpace:true ,message:'Please enter only alphanumerics, special characters are not allowed and whitespace is allowed.' })],
countryCode:['', RxwebValidators.alphaNumeric({conditionalExpression:(x,y) => x.areaName == "Delhi" })],
cityCode:['', RxwebValidators.alphaNumeric({conditionalExpression:'x => x.areaName =="Delhi"' })],
});
}
}
ngOnInit() {
this.locationFormGroup = this.formBuilder.group({
areaName:['', RxwebValidators.alphaNumeric()],
});
}
}
ngOnInit() {
this.locationFormGroup = this.formBuilder.group({
postalAddress:['', RxwebValidators.alphaNumeric({message:'Please enter only alphanumerics, special characters are not allowed.' })],
});
}
}
ngOnInit() {
this.locationFormGroup = this.formBuilder.group({
areaName:['', RxwebValidators.alphaNumeric()],
flatAddress:['', RxwebValidators.alphaNumeric({allowWhiteSpace:true })],
postalAddress:['', RxwebValidators.alphaNumeric({message:'Please enter only alphanumerics, special characters are not allowed.' })],
countryCode:['', RxwebValidators.alphaNumeric({conditionalExpression:(x,y) => x.areaName == "Delhi" })],
cityCode:['', RxwebValidators.alphaNumeric({conditionalExpression:'x => x.areaName =="Delhi"' })],
});
}
}
ngOnInit() {
this.locationFormGroup = this.formBuilder.group({
areaName:['', RxwebValidators.alphaNumeric()],
});
}
}
ngOnInit() {
this.locationFormGroup = this.formBuilder.group({
areaName:['', RxwebValidators.alphaNumeric()],
cityCode:['', RxwebValidators.alphaNumeric({conditionalExpression:'x => x.areaName =="Delhi"' })],
countryCode:['', RxwebValidators.alphaNumeric({conditionalExpression:(x,y) => x.areaName == "Delhi" })],
});
}
}
ngOnInit() {
this.locationFormGroup = this.formBuilder.group({
postalAddress:['', RxwebValidators.alphaNumeric({allowWhiteSpace:true ,message:'Please enter only alphanumerics, special characters are not allowed and whitespace is allowed.' })],
});
}
}