aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_validations.md
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2014-12-09 16:51:21 -0200
committerAndrey Nering <andrey.nering@gmail.com>2014-12-09 19:10:50 -0200
commit5d6c6ec0996249d2d4a6dc8e144163125626db16 (patch)
tree29a46b651e9c9f462f362ebd56a0dad3e3e4f052 /guides/source/active_record_validations.md
parent8e52954349c29d5f190f01b21e9087885afd8dab (diff)
downloadrails-5d6c6ec0996249d2d4a6dc8e144163125626db16.tar.gz
rails-5d6c6ec0996249d2d4a6dc8e144163125626db16.tar.bz2
rails-5d6c6ec0996249d2d4a6dc8e144163125626db16.zip
Adding information about 'allow_nil' option for 'numericality' [ci skip]
Diffstat (limited to 'guides/source/active_record_validations.md')
-rw-r--r--guides/source/active_record_validations.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md
index 546c0608ee..7628b8278d 100644
--- a/guides/source/active_record_validations.md
+++ b/guides/source/active_record_validations.md
@@ -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`