Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Validating dynamically added forms

steve-v-jedo edited this page · 1 revision

In order to validate forms added to the page dynamically the validate function needs to be called for that form.

For example:

If you dynamically render the following rails template into you view:

<%= form_for @some_model, :validate => true, :id => 'my_dynamic_form' do |f| %>
   <%= f.text_field :some_attribute %>
<% end %>

you will need to call:

$('#my_dynamic_form').validate()

to have form validate client side.

Something went wrong with that request. Please try again.