Skip to main content

Bug Tracker

Side navigation

#3154 closed bug (fixed)

Opened July 13, 2008 05:38PM UTC

Closed August 13, 2008 06:16PM UTC

Last modified August 14, 2008 02:03PM UTC

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

Reported by: joern Owned by: flesler
Priority: major Milestone: 1.3
Component: core Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:
Description

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 (1)
Change History (4)

Changed July 13, 2008 05:38PM UTC by joern comment:1

description: 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.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 July 13, 2008 05:58PM UTC by flesler comment:2

status: newassigned

The reason is .split is used to detect strings on makeArray.

We'll look into this.

Changed August 13, 2008 06:16PM UTC by flesler comment:3

resolution: → fixed
status: assignedclosed

Fixed at [5828].

Changed August 14, 2008 02:03PM UTC by flesler comment:4

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