Skip to content

Commit

Permalink
Update docs to reflect :allow_blank and :tokenizer options
Browse files Browse the repository at this point in the history
  • Loading branch information
obrie committed Apr 12, 2009
1 parent 6de5d5b commit 8ae7d5a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/validates_as_email_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ module ValidatesAsEmailAddress
# * <tt>:wrong_length</tt> - The error message if using the <tt>:is</tt>
# method and the attribute is the wrong size (default is:
# "is the wrong length (should be %d characters)")
# * <tt>:tokenizer</tt> - Specifies how to split up the attribute string.
# (e.g. <tt>:tokenizer => lambda {|str| str.scan(/\w+/)}</tt> to count
# words.) Defaults to <tt>lambda {|value| value.split(//)}</tt> which
# counts individual characters.
#
# Configuration options for format:
# * <tt>:wrong_format</tt> - A custom error message (default is:
# "is an invalid email address")
#
# Miscellaneous configuration options:
# * <tt>:allow_nil</tt> - Attribute may be nil; skip validation.
# * <tt>:allow_blank</tt> - Attribute may be blank; skip validation.
# * <tt>:on</tt> - Specifies when this validation is active (default is
# :save, other options :create, :update)
# * <tt>:if</tt> - Specifies a method, proc or string to call to determine if
Expand Down

0 comments on commit 8ae7d5a

Please sign in to comment.