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

mynod.performCheck returns 'undefined' #119

Open
luminarious opened this issue Jan 21, 2016 · 1 comment
Open

mynod.performCheck returns 'undefined' #119

luminarious opened this issue Jan 21, 2016 · 1 comment

Comments

@luminarious
Copy link

Overall you've made a very nice validation library, as I really like the interface. Only confusion is with performCheck, where I'm building a multi-step form and I'm trying to validate all my fields before changing view. Unfortunately, mynod.performCheck('#step1 input[type="checkbox"]') returns 'undefined' instead of error or validation result.

What could be the case?

@casperin
Copy link
Owner

Thanks a lot! The interface really do make or break modules, I agree. We don't spend enough time thinking about them.

It sounds like either a bug, or that you're trying to get a result of a non-existing element.

If it's the former, I'll fix it (or you can take a shot at it. nod is just one file, with fairly extensive comments). Could you make a codepen.io that shows the problem? That makes it infinitely easier for me to take a crack at.

If it's the latter, I think nod should return an 'ELEMENT_NOT_FOUND' string, or some such. undefined is (evidently) entirely useless as it could mean anything.

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