-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Validation] Legacy Settings Detection Incorrectly Duck-Types #2629
Comments
identifier
causes error with form validations
It looks like an object is being passed in as a validation identifier, I'm unsure the exact issue without a test case, but it seems clear to me that |
I've gone ahead and added type validation, if you have a test case that produces the error when passing in a normal string identifier let me know, and I'll examine separately. |
@jlukic: I'm not sure if I'm understanding you correctly, but I may not have explained myself clearly. I followed this example from the documentation: $('.ui.form')
.form({
fields: {
name: {
identifier : 'name',
rules: [
{
type : 'empty',
prompt : 'Please enter your name'
}
]
},
skills: {
identifier : 'skills',
rules: [
type : 'minCount[2]',
prompt : 'Please select at least two skills'
]
},
// ....
}
})
; The specific issue is when instead of And then, later in the code, attempting to treat the validations for the field |
Sorry I think the first post when I visited didn't have a test case (or i missed it). I'll take a look at a fix. |
Sorry about the confusion, fixed in patch. |
JSFiddle: http://jsfiddle.net/jev4qec3/1/
If it's relevant, I'm using Chrome.
I hit this problem while porting an application forward from Semantic UI 1.x. After refactoring my validations to use the new form validation API, one form was still reporting the following error:
After that, attempting to submit the form gives the following error:
The JSFiddle linked above has validations configured with an added underscore to work around the issue. Removing the underscore triggers the error.
The text was updated successfully, but these errors were encountered: