Update validations.rb

Fix issue with partial string replacement that is not allowed in last rails 2.3