Bug Tracker


Ticket #3154 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

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:
Blocking: Blocked by:

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.


split-elements-testcase.diff Download (1.8 KB) - added by joern 6 years ago.

Change History

Changed 6 years ago by joern

comment:1 Changed 6 years ago by joern

  • Description modified (diff)

comment:2 Changed 6 years 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.

comment:3 Changed 6 years ago by flesler

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed at [5828].

comment:4 Changed 6 years ago by flesler

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.


Add a comment

Modify Ticket

as closed

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.