Skip to content
Browse files

Document validation options

  • Loading branch information...
1 parent 8ad4b3a commit 53224768c12c34d991f2a8169c983930d44eaaf0 @soulcutter soulcutter committed
Showing with 14 additions and 0 deletions.
  1. +14 −0 README.md
View
14 README.md
@@ -114,6 +114,20 @@ product.optional_price # => nil
product.optional_price_cents # => nil
```
+#### Numericality validation options
+
+You can also pass along
+[numericality validation options](http://guides.rubyonrails.org/active_record_validations_callbacks.html#numericality)
+such as this:
+
+```ruby
+monetize :price_in_a_range_cents, :allow_nil => true,
+ :numericality => {
+ :greater_than_or_equal_to => 0,
+ :less_than_or_equal_to => 10000
+ }
+```
+
### Mongoid 2.x and 3.x
`Money` is available as a field type to supply during a field definition:

0 comments on commit 5322476

Please sign in to comment.
Something went wrong with that request. Please try again.