change validations to rails 3 syntax