Ruby/Rails duomenų validatinimas
< Ruby
Modelyje:
validates_length_of :category, :within => 1..20 validates_uniqueness_of :category, :message => "already exists"
View'e:
<%= error_messages_for 'someModel' %>
Modelyje:
validates_length_of :category, :within => 1..20 validates_uniqueness_of :category, :message => "already exists"
View'e:
<%= error_messages_for 'someModel' %>