Just be careful when you do this. If you don't use an absolute FQDN you can trigger severe delay in getting a response from the resolver. It can take twenty or thirty seconds (or more) to get a response.
At some point if you want to be absolutely sure, you'll have to send a validation link / email and not doing it frontend in JavaScript ;)
HTTP calls for client side validation? That's a great idea!