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

possible problem with .net validators #50

Closed
prainho opened this issue Aug 24, 2013 · 3 comments
Closed

possible problem with .net validators #50

prainho opened this issue Aug 24, 2013 · 3 comments

Comments

@prainho
Copy link

prainho commented Aug 24, 2013

I haven't tested yet this new version but looking at this method

behaviour: function(e) { var newVal = p.getMasked(mask); e = e || window.event;
            if ($.inArray(e.keyCode || e.which, jMask.byPassKeys) === -1 && newVal !== p.val())
                p.val(newVal).change();

            return p.seekCallbacks(e, newVal);
        },
using the change() is not a good idea. Validators in .net intercept the change event and this will trigger validation.

ex:
if I have a mask 99-99-9999 and I write 111 this will trigger the change event because 111 will change to 11-1 at this time this is a invalid date and the validators will inform the user that this is an invalid date.

You shouldn't trigger the change at this time or it should be a way to override it.

@igorescobar
Copy link
Owner

I have to do that because in older browsers somehow when I do that element.val('newValue'); the change event is never triggered so I had to force it. BUT check out the v1.1.0 and test it.

@igorescobar
Copy link
Owner

News?

@prainho
Copy link
Author

prainho commented Aug 26, 2013

I've tested today and it's working. Thanks

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

2 participants