simple form - How do I set minimum length of my Simple_Form textarea? Ruby on Rails -
i curious how should change validation setting of simple_form allows me set minlength textarea. how shall manage that? thank you!
no, simple form doesn't provide validation textarea
. have use javascript, guess jquery-validation
fits here.
it worth mentioning can take advantage of html5 validation attribute i.e maxlength
text area.
and, in case if don't know generate required textarea
wrapper... how
<%= f.input :name , as: :text , :input_html => {:minlength => 10 , maxlength: 25} %>
Comments
Post a Comment