Bug Tracker

Ticket #3154 (closed bug: fixed)

Opened 1 year ago

Last modified 11 months ago

field name "split" breaks add(form.elements)

Reported by: joern Assigned to: flesler
Type: bug Priority: major
Milestone: 1.3 Component: core
Version: 1.2.6 Keywords:
Cc: Needs: Review

Description (last modified by joern) (diff)

A validation plugin user reported that giving a field the name-attribute "split" breaks the validation. Eventually I found out that this causes $([]).add(form.elements) to return a nested array (instead of just a flat one), eg.

[[input]] instead of [input]

(think array == jQuery object)

I have no idea whats causing that. A patch with a testcase is attached.

Attachments

split-elements-testcase.diff (1.8 kB) - added by joern 1 year ago.

Change History

Changed 1 year ago by joern

Changed 1 year ago by joern

  • description changed from A validation plugin user reported that giving a field the name-attribute "split" breaks the validation. Eventually I found out that this causes $([]).add(form.elements) to return a nested array (instead of just a flat one), eg. [[input]] instead of [input] (think array == jQuery object) I have no idea whats causing that. A patch with a testcase is attached. to A validation plugin user reported that giving a field the name-attribute "split" breaks the validation. Eventually I found out that this causes $([]).add(form.elements) to return a nested array (instead of just a flat one), eg. {{{ [[input]] instead of [input] }}} (think array == jQuery object) I have no idea whats causing that. A patch with a testcase is attached.

Changed 1 year ago by flesler

  • status changed from new to assigned

The reason is .split is used to detect strings on makeArray. We'll look into this.

Changed 11 months ago by flesler

  • status changed from assigned to closed
  • resolution set to fixed

Fixed at [5828].

Changed 11 months ago by flesler

Fixed [5828] on [5829]. I put 'function' instead of 'string'.

Note: See TracTickets for help on using tickets.