Form helpers produce invalid XHTML code!

Hi all

The following scaffold creation form code…

<%= start_form_tag :action => ‘create’ %>
<%= render :partial => ‘form’ %>
<%= submit_tag “Create” %>
<%= end_form_tag %>

…creates this HTML colde:

Name

About

So far, so good. But as soon as an error is shown after submitting the
form it produces this code:

1 error prohibited this artist from being saved

There were problems with the following fields:

  • Name can't be blank

Name

About

ASD

This is NOT valid XHTML 1.1! Tidy tells me:

line 67 column 113 - Warning: replacing

by

line 67 column 113 - Warning: inserting implicit

line 67 column 113 - Warning:
element not empty or not closed

This is very annoying, because I really want to have only valid XHTML
1.1 code. What can I do against it?

Thanks a lot and have a good time,
Joshua

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs