...
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: see http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/12eca4adcddcea9d/b33248819234726f?lnk=gst&q=.empty#b33248819234726f
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
Tom