Forum: Ruby on Rails validate for a groups of at least 4 items

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
47670cafb5fc715a47a257c5549befe7?d=identicon&s=25 Hi Foobar (hfoobar)
on 2007-06-30 11:16
HI all,

I have 2 tables: groups and items. The relation is 1-* (each group has
many items). In reality each groups should have at least 4 items.

How can I implement an input form so I can input 4 items at the same
time?

And how can I validate the input to ensure that each group must have >=4
items?

Thank you so much for replies.

-- ruby/rails newbie
This topic is locked and can not be replied to.