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

Form validation issues #3045

Closed
miniskulljob opened this issue Sep 16, 2015 · 7 comments
Closed

Form validation issues #3045

miniskulljob opened this issue Sep 16, 2015 · 7 comments

Comments

@miniskulljob
Copy link

Hi.

The new form validation shorthand has some issues. Check out this JSFiddle. In it, I have used the two methods: the conventional one, and the shorthand. Conventional works fine, but the shorthand always returns a success, even if the field is empty.
Another issue is that both methods call two times the result function, onSuccess or onFailure.

@jlukic
Copy link
Member

jlukic commented Sep 17, 2015

Yeah... I'm not sure why this obvious case isnt working.. grr...

@maturanomx
Copy link
Contributor

I made a PR that I believe solve this issue[*]. You can see the result here: https://jsbin.com/xahide/3/edit?html,console,output

[*]: Although I don't know what I'm doing 😅

@miniskulljob
Copy link
Author

Yeah, seems like it works, but it isn't using the official repos from semantic.org, maybe there's something different...
And, in your jsbin, the result function is called two times too.

@jlukic
Copy link
Member

jlukic commented Sep 18, 2015

I'll try to take a look at this soon.

@maturanomx
Copy link
Contributor

@miniskulljob

but it isn't using the official repos from semantic.org

That's right. Is using the version of my fork, just for test the patch.

And, in your jsbin, the result function is called two times too

It seems that something has changed at this time. Also your JSFiddle change; both cases doesn't works, now generate the error TypeError: range.indexOf is not a function (confirm please)

This PR solve this new error... I keep watching

Edit

I'm confused. I don't see any change in next neither master.

Really your JSFiddle change the behavior your describe here or I didn't understand?. This is what I see:
recorded_screen

@federicotarantino
Copy link

Hi,
related to this issue, i suggest implementing range logic also on "decimal" rule.
In my project I create a "range" rule that work with integer and decimal.

@jlukic
Copy link
Member

jlukic commented Dec 19, 2015

I believe this was fixed but mistagged. If I'm wrong here please let me know.

@jlukic jlukic closed this as completed Dec 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants