# Check\_box validation error\_message div/span tag problem

**URL:** <https://www.ruby-forum.com/t/check-box-validation-error-message-div-span-tag-problem/135791>\
**Category:** Rails\
**Created:** [April 25, 2008, 12:23am UTC](https://www.ruby-forum.com/t/check-box-validation-error-message-div-span-tag-problem/135791 "2008-04-25T00:23:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erwin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/a88e57/32.png) [@Erwin](https://www.ruby-forum.com/u/Erwin)\
**Post date:** [April 25, 2008, 12:23am UTC](https://www.ruby-forum.com/t/check-box-validation-error-message-div-span-tag-problem/135791/1 "2008-04-25T00:23:10Z")

</div>

when a check box in my form is not validated, the check box and the  
label are not anymore aligned… a hidden input field is added, which  
gives a mess in the display…

 \<%= f.check\_box(:accepted\_terms, {:id =\> "user\_accepted\_terms"} %\>I am over 14 \<% if @user.errors.on(:accepted\_terms) %\> \<%= @user.errors.on(:accepted\_terms) %\> \<% end %\> 

but the generated html is : (2 divs which leads to the check box and  
the label on 2 lines)

 

 

I am over 14 years •You must confirm this paragraph  

is there any way to avoid this problem ?
