[feat] Add "checkValidOnLastCellInput" option to only check the valid input on the last cell input
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
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?