title: adding validation to models
body: <p>I want to add some validation to my rails app. Im using Postgresql. I've created a post table and a user table. Each user can have multiple posts and each post can have multiple users. However, each post can have only one category(another table). What do I need to add to the model?</p>