lib/mongoid/validatable/macros.rb in mongoid-7.0.4 vs lib/mongoid/validatable/macros.rb in mongoid-7.0.5
- old
+ new
@@ -46,10 +46,10 @@
# @example
# class Person
# include Mongoid::Document
# field :title
#
- # validates_format_of :title, with: /^[a-z0-9 \-_]*$/i
+ # validates_format_of :title, with: /\A[a-z0-9 \-_]*\z/i
# end
#
# @param [ Array ] args The names of the fields to validate.
#
# @since 2.4.0