Text input validation e.g. as a phone number

What is the most efficient way to implment validation of text inputs as phone numbers and emails etc.?

Is the lose focus->validate->return focus the only way you can do it?

Are there any extensions you can add that give you a wider range of text inputs? Do those extensions work in both Android and Apple IOS?

You can use extension like:

But extension is not working in iOS