I am having two inputs, one with country code options like CA, US and so on and another with mobile number. I saw in some of the source to use google-libphonenumber for validation and i find a custom validation for that in Use google-libphonenumber in angular reactive forms validator , using this custom validator bring me some errors in return validNumber ? null : { 'wrongNumber': { value: control.value } };
Type '{ wrongNumber: { value: any; }; } | null' is not assignable to type '{ [key: string]: any; }'. Type 'null' is not assignable to type '{ [key: string]: any; }'.
how to pass the country code and mobile number to validate and if invalidate show error in the html pass.