Rails: how to require at least one field not to be blank

Posted by deb on Stack Overflow See other posts from Stack Overflow or by deb
Published on 2010-05-13T00:02:18Z Indexed on 2010/05/13 0:04 UTC
Read the original article Hit count: 212

Hi

I know I can require a field by adding validates_presence_of :field to the model. However, how do I require at least one field to be mandatory, while not requiring any particular field?

thanks in advance

-- Deb

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about validation