add validate to posts and associate models