Cnilton / react-native-floating-label-input

A customizable React Native TextInput with its placeholder always shown. Includes masks, global styles, character count, and a bunch else.
MIT License
278 stars 58 forks source link

Custom mask type #154

Open rodrigodiasf1984 opened 1 year ago

rodrigodiasf1984 commented 1 year ago

Hi guys, first of all, I'd like to thank you for this amazing package.

Second, how can I use a mask like this?

4 number 1 space and 3 letters?

image

I need something like this, but the 3 last digits should be only letters, at the moment this allow the user to type numbers too. image

I'm using react-hook-form

Maybe it needs to add a custom mask type? Or can I achieve this using some regex?

Thanks for your help.

rodrigodiasf1984 commented 1 year ago

@Cnilton can you help me with this? Thanks.

Cnilton commented 1 year ago

Hi, @rodrigodiasf1984, sorry for the holdup. So to achieve this, we would have to do a regex-like comparison to distinguish characters from numbers. I'll come up with a solution, but it will take some time, ok?

rodrigodiasf1984 commented 1 year ago

Hi, @rodrigodiasf1984, sorry for the holdup. So to achieve this, we would have to do a regex-like comparison to distinguish characters from numbers. I'll come up with a solution, but it will take some time, ok?

Hi @Cnilton, thanks for your feedback, it's ok, when you've achieved this let me know, Thanks!(Obrigado mano!TMJ!)