On Mon, Jan 5, 2009 at 2:40 PM, Rob <robstefanus...@gmail.com> wrote:
>
> Hi Jörn or anyone else familiar with this plugin,
>
> First off, thanks for the great validation plugin.  I hope I do not
> impose too much with this question.
>
> I have a dynamic form with fields named using brackets ([]).

See this note:
http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29


> Validation is working for fields that existed on the initial page
> load, but when I add append the code for a new field, the validation
> events are, of course, not attached to the new DOM elements.  What's
> the best way to accomplish this?

Make sure you understand event delegation. There's some info in the
docs. Basically, you need to ensure that any newly-created elements
are bound to event handlers. You can either bind them when they are
added or bind the container and findthe specific element in your event
handler by getting event.target.

Though, I've no idea how to do this with the Validation plugin, specifically.

Reply via email to