Tkko / Flutter_Pinput

Flutter package to create Pin code input text field with every pixel customization possibility 🎨 with beautiful animations, iOS autofill, Android autofill
https://pub.dev/packages/pinput
MIT License
700 stars 172 forks source link

[2.3.0] Unclear change log `default SMS code matcher regex length to 8 digits` how should I change my code to stay on 6 chars? #141

Closed mariopepe closed 10 months ago

mariopepe commented 10 months ago

The change log for a potentially (maybe? not sure? not clear?) breaking change is not clear.

Change log states: Updated default SMS code matcher regex length to 8 digits.

My OTPs are 6 chars, how should I change the code to keep the matcher length to 6 digits?

I tried to search in the commits history but none of the commits seems to be about that so I am not even sure how to find this information by myself (see screenshot)

Thanks

Tkko commented 10 months ago

Hey @mariopepe, sorry for the inconvenience, from now on the default sms code matcher regex will match maximum 8 characters instead of 7, so you should be good to go.

Old: const _defaultCodeMatcher = '\\d{4,7}';

Current: const _defaultCodeMatcher = '\\d{4,8}';

mariopepe commented 10 months ago

Fantastic thanks to you!

devpawann commented 5 months ago

@Tkko WDYT about, user can pass the custom matcher?

Tkko commented 5 months ago

@devpawann you can pass it. The parameter is called smsCodeMatcher