OSDN Git Service

Adds validation of inputs
[dianzhuhui/site.git] / hanMorph / app / views / hanmorph / _searchmenu.html.erb
index 8e20178..a69119a 100644 (file)
       <% end %>
       </li>
     </ul>
+
+    <% if @errors && !@errors.empty? then %>
+    <ul style="color: red">
+      <% if @message then %>
+        <li><%= @message %></li>
+      <% end %>
+      <% for error in @errors %>
+        <li><%= error %></li>
+      <% end %>
+    </ul>
+    <% end %>
   </div>