Ruby on Rails validation for two connected fields

On a recent Ruby on Rails project I needed to validate an address form so that when submitted, either the house number or the house name or both were present.
Although this post nearly did it, I had to modify Eric’s code slightly and this is the result (taken from the address.rb model file)
This [...]