Rails3 compatibility: replace validate