Been thinking of implementing an asychronous custom validator for a form with the sole purpose of communicating with a microservice to extract information out of a person's ID number (like age, date of birth, gender, race, etc) and of course whether the ID number is valid or not based on the country they send through.
So if a person enters their ID number and selects a country, a request is fired off to a microservice, and if they haven't set their gender for instance, it automatically populates it, to which they can change it afterwards if need be.
Questions
- Is it good/OK practice to set other form control values in a validator according to the following scenario?
- If so, how would I go about modifying the other form control values?
Any help would be appreciated :)