Hi;
Every Registry has its own rules.
And all provides a tool for you to check if the domain name is taken or not.
They provide API and simply you send the request to the registry. If you get available response, you let the user start the registration.
If it is not available for one reason or another, you reply back by saying the domain name is taken.
Mesut Bulent Turkoglu
Msc. EE
Director of Operations
http://*********.com