adding validations to post.rb