This validation should be outside of the ActiveRecord version < 4 check.