'I am trying to merge two properties along with validation pls help me
concernForm = this.formBuilder.group({
voucherId: [null, [Validators.required,Validators.pattern(validationProps.nonwhiteSpacePattern)]],
customerId: [null, [Validators.required]],
description: [null, Validators.required],
supportingDocument: [null, Validators.required],
voucherCode: [null, [Validators.required]]
})
I am trying to merge voucherId & VoucherCode but it is showing error i am passing this object to api
if i do this it is not working
Voucher = voucherId: [null, [Validators.required,Validators.pattern(validationProps.nonwhiteSpacePattern)]] + voucherCode: [null, [Validators.required]],
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|