Now there is a problem to choose the country and the regions, you have to write it down. A selection box is not displayed.
This code doesn't affect you register page in any way, this code will run before the data is save in database, so no change on register page.
By default osclass has no country selection on register from, so your theme or the plugin you use to add those fields on that form has no option to handle the error, if an error is accured and you go back on register page.
Or maybe your theme or plugin has a js validation but only for that fields(Country, Region, City) and not for phone field. In this case you have to change the js validation function and add a validation for phone also there. Or maybe i am wrong and you have other issue there.
In each case this code has nothing to do with the registration form, the code only return the user on register page if you have no phone in that field. The rest you need to figure out yourself.