FlagPhoneNumber icon indicating copy to clipboard operation
FlagPhoneNumber copied to clipboard

Mobile Phone Placeholder

Open Sydney-o9 opened this issue 5 years ago • 2 comments

At the moment the placeholder shows a landline phone number, is it possible to use a mobile phone number placeholder?

Sydney-o9 avatar Jul 24 '19 07:07 Sydney-o9

FlagPhoneNumber uses libPhoneNumber lib and what I know about it now, it's not possible to use a mobile phone number.

grifas avatar Jul 24 '19 08:07 grifas

Yes you can @grifas - see NBPhoneNumberUtil.

So it's possible to do the following in FPNTextField

let example = try phoneUtil.getExampleNumber(forType: countryCode.rawValue, type: NBEPhoneNumberType.MOBILE)

Edit. Maybe we could have a setExampleNumberType(_ type:NBEPhoneNumberType) method

phoneNumberTextField.setExampleNumberType(NBEPhoneNumberType.MOBILE)

Sydney-o9 avatar Jul 25 '19 05:07 Sydney-o9