Conversation
|
Thank you. Could you elaborate why this option would be useful? We would also need tests to cover the new use-case. I can review the docs and code comments after that. |
|
This option is usefull in follow case. |
generates an empty entry for an empty select multiple element
| } | ||
| if(obj.multiple) { | ||
| type = 'array'; | ||
| } |
There was a problem hiding this comment.
Why is this check? Maybe we should explain in a comment for clarity
| // Filter with the standard W3C rules for successful controls: http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2 | ||
| return this.name && // must contain a name attribute | ||
| !$el.is(":disabled") && // must not be disable (use .is(":disabled") so that fieldset[disabled] works) | ||
| (!$el.is(":disabled") || $el.is(":disabled") && opts.includeDisabled) && // must not be disable (use .is(":disabled") so that fieldset[disabled] works) |
There was a problem hiding this comment.
check seems equivalent to (!$el.is(":disabled") || opts.includeDisabled)
| } ); | ||
| if(!val.length) { | ||
| return { name: el.name, el: el } | ||
| } |
There was a problem hiding this comment.
when would the array not have a length property? Should that not be factored into the isArray(val) function check?
If "true" also disabled :input items are included.