diff options
author | Philipe Fatio <me@phili.pe> | 2017-03-14 10:57:50 +0100 |
---|---|---|
committer | Philipe Fatio <me@phili.pe> | 2017-03-14 10:57:50 +0100 |
commit | 96c525f2509a9ec1890c5218f6a65b22660b97f7 (patch) | |
tree | 63b62568599b0c0f972c16e654b627284ab6b93e /guides/source/active_record_validations.md | |
parent | 29709cd3f3b997015071bbe9336744b5673bc587 (diff) | |
download | rails-96c525f2509a9ec1890c5218f6a65b22660b97f7.tar.gz rails-96c525f2509a9ec1890c5218f6a65b22660b97f7.tar.bz2 rails-96c525f2509a9ec1890c5218f6a65b22660b97f7.zip |
Remove obsolete warning about regular expression
This warning became obsolete when the regular expression was changed to
use `\z` instead of `\Z` in fce9c4e5e1ecb31cff2ca43a04fbe332816c3c45.
"-1234\n" =~ /\A[+-]?\d+\Z/ => 0
"-1234\n" =~ /\A[+-]?\d+\z/ => nil
[ci skip]
Diffstat (limited to 'guides/source/active_record_validations.md')
-rw-r--r-- | guides/source/active_record_validations.md | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index 32b38cde5e..5313361dfd 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -490,9 +490,6 @@ If you set `:only_integer` to `true`, then it will use the regular expression to validate the attribute's value. Otherwise, it will try to convert the value to a number using `Float`. -WARNING. Note that the regular expression above allows a trailing newline -character. - ```ruby class Player < ApplicationRecord validates :points, numericality: true |