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:
parent
8e52954349
commit
5d6c6ec099
1 changed files with 2 additions and 0 deletions
|
@ -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`
|
||||
|
|
Loading…
Reference in a new issue