thegamenicorus / react-native-phone-input

Phone input box for React Native
https://www.npmjs.com/package/react-native-phone-input
MIT License
394 stars 447 forks source link

Could you please add the onBlur property in the Configuration? #40

Closed auchen closed 4 years ago

auchen commented 6 years ago

This is an excellent project. It would be wonderful if you could add the onBlur configuration. Sometimes the phone number input field needs to be validated lively, e.g. length, numbers only, etc. Thanks very much.

cmwendwa commented 6 years ago

Was able to pass an onBlur callback using textProps, can be a list of objects that are TextInput props or custom props incase of a custom TextComponent:

 textProps={{ onBlur: () => { console.log("PHONE  BLUR") }, }}