Rails3 compatibility: replace before_validation