ohteepee icon indicating copy to clipboard operation
ohteepee copied to clipboard

[feat] Add "checkValidOnLastCellInput" option to only check the valid input on the last cell input

Open luongvo opened this issue 1 year ago • 1 comments

resolves #32

What happened 👀

  • Add "checkValidOnLastCellInput" option to only check the valid input on the last cell input.

Proof Of Work 📹

https://github.com/user-attachments/assets/73fa6cef-1838-4da0-ad45-3a6853e40c7b

luongvo avatar Aug 29 '24 01:08 luongvo

Hi @luongvo, thanks a lot for your contribution. However, I didn't fully understand the use case in which a developer would want to use such a flag. Normally the developer would want to validate the OTP code when it's completed immediately. For example, if the user enters 123450 and the actual code is 023456, the user will just change the first char and revalidate it. In case the developer doesn't want that he can manually check if a validation happened before and then ignore the new onValid callback altogether.

For keeping the API minimal I think it's better to leave this kind of additional feature up to the developer to manage instead of adding a lot of config to the library, what do you think?

ilyasipek avatar Sep 04 '24 06:09 ilyasipek