Skip to content

Commit

Permalink
Merge branch 'deimos1986/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffgarside committed Sep 4, 2008
2 parents 899e012 + 6cee2cc commit 0340917
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions book/source/Chapters/4_A_Little_Blog/1_MVC/1_Models.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ We can test this by calling `valid?` on one of our posts:
@post.valid?
=> true

If an object isn't valid, you can access its the errors by calling its `errors` method.

@post.errors
=> #<DataMapper::Validate::ValidationErrors:0x2537e40 @errors={:body=>["Body must not be blank"]}>


#### Contextual Validation
Expand Down

0 comments on commit 0340917

Please sign in to comment.