diff options
author | Zachary Scott <e@zzak.io> | 2014-12-09 13:41:10 -0800 |
---|---|---|
committer | Zachary Scott <e@zzak.io> | 2014-12-09 13:41:10 -0800 |
commit | 6b1cd5a10e4ae3fb048d8e6bf45549a7b2055c71 (patch) | |
tree | 32e39210f3389b1c2694f8b89c47b8e0c41fde7a /guides | |
parent | 7c11ce6fe1d1f76294d45e93685dc9c7938eb975 (diff) | |
parent | 5d6c6ec0996249d2d4a6dc8e144163125626db16 (diff) | |
download | rails-6b1cd5a10e4ae3fb048d8e6bf45549a7b2055c71.tar.gz rails-6b1cd5a10e4ae3fb048d8e6bf45549a7b2055c71.tar.bz2 rails-6b1cd5a10e4ae3fb048d8e6bf45549a7b2055c71.zip |
Merge pull request #17987 from andreynering/ar-validation-doc
Adding information about 'allow_nil' option for 'numericality' [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_record_validations.md | 2 |
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` |