lib/mongoid/validatable/macros.rb in mongoid-8.0.1 vs lib/mongoid/validatable/macros.rb in mongoid-8.0.2
- old
+ new
@@ -17,11 +17,10 @@
#
# validates_associated :name, :addresses
# end
#
# @param [ Array ] args The arguments to pass to the validator.
- #
def validates_associated(*args)
validates_with(AssociatedValidator, _merge_attributes(args))
end
# Validates whether or not a field is unique against the documents in the
@@ -35,10 +34,9 @@
#
# validates_uniqueness_of :title
# end
#
# @param [ Array ] args The arguments to pass to the validator.
- #
def validates_uniqueness_of(*args)
validates_with(UniquenessValidator, _merge_attributes(args))
end
# Validates the format of a field.