This basic structure should work. When the value of the :if condition
is false, the validation will not run. So perhaps it's the "empty?"
method -- should it be "blank?" instead. I tried to find any
reference to the differences between blank? empty? nil?. Looking
further in the book, it seems that blank? is true if the receiver is
nil or an empty string. And there's a thread I found on this group:
I had trouble finding "blank" documented in the API for ruby or rails,
but this could just be because I wasn't looking in the right place