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

Input with type=button validated but not focused in #1891

Closed
denar90 opened this issue Nov 14, 2016 · 0 comments
Closed

Input with type=button validated but not focused in #1891

denar90 opened this issue Nov 14, 2016 · 0 comments

Comments

@denar90
Copy link
Contributor

denar90 commented Nov 14, 2016

Subject of the issue

Hi guys. We've been using validator in scope of our project and discovered one interesting think.
If input type is button then it can be validated by validation rules, but handler on focusin event will not be fired. It happens because of
https://github.com/jzaefferer/jquery-validation/blob/master/src/core.js#L398-L402
handler for type=button is not set.

Environment

  • version of jquery-validate - 1.15.1
  • Chrome Canary - browser

Steps to reproduce

Here some fiddle - https://jsfiddle.net/yvmd3nta/

I have several ideas how to solve this.

  1. Add handler for type=button
  2. Add option where list of elements which will be handled can be set. Default will be current list.
  3. Remove validation from inputs with type=button

I would prefer either 1 or 2 and like to make PR if you don't mind.

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

No branches or pull requests

1 participant