Skip to content

Commit 86cc3a0

Browse files
authored
Merge pull request rails#46260 from blakegearin/main
Update documentation of length validation
2 parents d73d3cd + 30edef7 commit 86cc3a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activemodel/lib/active_model/validations/validates.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ module ClassMethods
9696
# Example:
9797
#
9898
# validates :password, presence: true, confirmation: true, if: :password_required?
99-
# validates :token, length: 24, strict: TokenLengthException
99+
# validates :token, length: {is: 24}, strict: TokenLengthException
100100
#
101101
#
102102
# Finally, the options +:if+, +:unless+, +:on+, +:allow_blank+, +:allow_nil+, +:strict+

0 commit comments

Comments
 (0)