From c5c08c6499a00abff779b09a2fc0123f7568db1b Mon Sep 17 00:00:00 2001 From: Rob Date: Thu, 16 Oct 2014 12:24:32 +0100 Subject: mention the :without option [ci skip] As pointed out in the ActiveModel::Validations::HelperMethods #validates_format_of documentation. --- guides/source/active_record_validations.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index 4dc7203ba3..cba4b852a1 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -361,6 +361,8 @@ class Product < ActiveRecord::Base end ``` +Alternatively, you can require that the specified attribute does _not_ match the regular expression by using the `:without` option. + The default error message is _"is invalid"_. ### `inclusion` -- cgit v1.2.3