change to rails before_validation format