1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Adding information about 'allow_nil' option for 'numericality' [ci skip]

This commit is contained in:
Andrey Nering 2014-12-09 16:51:21 -02:00
parent 8e52954349
commit 5d6c6ec099

View file

@ -487,6 +487,8 @@ constraints to acceptable values:
* `:even` - Specifies the value must be an even number if set to true. The
default error message for this option is _"must be even"_.
NOTE: By default, `numericality` doesn't allow `nil` values. You can use `allow_nil: true` option to permit it.
The default error message is _"is not a number"_.
### `presence`