Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new event onIncompleteFocus #2248

Open
wants to merge 1 commit into
base: 5.x
Choose a base branch
from

Conversation

Evelyne28
Copy link

Hello!
I am working on a project and we're doing input validations on blur event. Our validation event is triggered before the InputMask 'onIncomplete' event, making our validation harder to implement.

I would suggest adding another event, 'onIncompleteFocus'. This would be similar to the 'onIncomplete' event, but would be triggered on Focus (as the 'onComplete' event).

For a mask like this: aaaa-9999, if the user enters 'abcd-1' and the next character entered is '2' then this event would be triggered (while the focus is still on).

@RobinHerbots
Copy link
Owner

@Evelyne28 ,

I can understand the need for instant validation. But maybe it is better to consolidate some event like oncomplete, onincomplete, onkeyvalidation and make some kind of onValidate which provides info like in the onkeyvalidation and also include a status which indicate complete or incomplete, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants