react-native-phone-input icon indicating copy to clipboard operation
react-native-phone-input copied to clipboard

maxlength support

Open arthedza opened this issue 5 years ago • 8 comments

For example:

<PhoneInput
    maxLength={14}
    ...

arthedza avatar Aug 13 '20 10:08 arthedza

Hey @arthedza did you find a fix for this?

SirPhemmiey avatar Aug 31 '20 17:08 SirPhemmiey

Hey @arthedza did you find a fix for this?

No, but I've found a PR for maxLength support.

arthedza avatar Sep 01 '20 07:09 arthedza

Hi. You can pass maxLength in textProps. <ReactNativePhoneInput ref={inputRef} initialValue={value} style={input} offset={30} textStyle={textStyle} initialCountry={'no'} textProps={maxLength: 10} onPressFlag={() => { handleOpenDropdown(); }} onChangePhoneNumber={onChangePhoneNumber} ></ReactNativePhoneInput>

andrushkodmytro avatar Nov 03 '21 17:11 andrushkodmytro

not working

bharvadiyavishal avatar Jun 17 '22 12:06 bharvadiyavishal

how can i maxlength(10) in react-native-phone-number-input.

bharvadiyavishal avatar Jun 17 '22 12:06 bharvadiyavishal

You can use a prop:

textInputProps={{ maxLength: 12 }}

marquinmpfs avatar Oct 12 '22 02:10 marquinmpfs

This works

codegien avatar Apr 22 '23 14:04 codegien

This works: textInputProps={{maxLength: 12}}

codegien avatar Apr 22 '23 14:04 codegien