Is there a "validates_empty" method or a way to do this in a single line?

Hi,

re Model validations: is there a “validates_empty” method or a way to
do this in a single line?

tks

Hmm… maybe validates_length_of with max set to 0 (and a custom
message)

Otherwise you may have to write your own validator using a callback
like before_create or before_validation_on_create.

– Mark.