mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #28026 from Sen-Zhang/fix_some_typos_in_comments
Change ActiveModel::Validation to ActiveModel::Validations in comments
This commit is contained in:
commit
6dccceef9c
11 changed files with 11 additions and 11 deletions
|
@ -22,7 +22,7 @@ module ActiveModel
|
||||||
#
|
#
|
||||||
# There is also a list of default options supported by every validator:
|
# There is also a list of default options supported by every validator:
|
||||||
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
||||||
# See <tt>ActiveModel::Validation#validates</tt> for more information
|
# See <tt>ActiveModel::Validations#validates</tt> for more information
|
||||||
def validates_absence_of(*attr_names)
|
def validates_absence_of(*attr_names)
|
||||||
validates_with AbsenceValidator, _merge_attributes(attr_names)
|
validates_with AbsenceValidator, _merge_attributes(attr_names)
|
||||||
end
|
end
|
||||||
|
|
|
@ -95,7 +95,7 @@ module ActiveModel
|
||||||
#
|
#
|
||||||
# There is also a list of default options supported by every validator:
|
# There is also a list of default options supported by every validator:
|
||||||
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
||||||
# See <tt>ActiveModel::Validation#validates</tt> for more information.
|
# See <tt>ActiveModel::Validations#validates</tt> for more information.
|
||||||
def validates_acceptance_of(*attr_names)
|
def validates_acceptance_of(*attr_names)
|
||||||
validates_with AcceptanceValidator, _merge_attributes(attr_names)
|
validates_with AcceptanceValidator, _merge_attributes(attr_names)
|
||||||
end
|
end
|
||||||
|
|
|
@ -69,7 +69,7 @@ module ActiveModel
|
||||||
#
|
#
|
||||||
# There is also a list of default options supported by every validator:
|
# There is also a list of default options supported by every validator:
|
||||||
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
||||||
# See <tt>ActiveModel::Validation#validates</tt> for more information
|
# See <tt>ActiveModel::Validations#validates</tt> for more information
|
||||||
def validates_confirmation_of(*attr_names)
|
def validates_confirmation_of(*attr_names)
|
||||||
validates_with ConfirmationValidator, _merge_attributes(attr_names)
|
validates_with ConfirmationValidator, _merge_attributes(attr_names)
|
||||||
end
|
end
|
||||||
|
|
|
@ -38,7 +38,7 @@ module ActiveModel
|
||||||
#
|
#
|
||||||
# There is also a list of default options supported by every validator:
|
# There is also a list of default options supported by every validator:
|
||||||
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
||||||
# See <tt>ActiveModel::Validation#validates</tt> for more information
|
# See <tt>ActiveModel::Validations#validates</tt> for more information
|
||||||
def validates_exclusion_of(*attr_names)
|
def validates_exclusion_of(*attr_names)
|
||||||
validates_with ExclusionValidator, _merge_attributes(attr_names)
|
validates_with ExclusionValidator, _merge_attributes(attr_names)
|
||||||
end
|
end
|
||||||
|
|
|
@ -104,7 +104,7 @@ module ActiveModel
|
||||||
#
|
#
|
||||||
# There is also a list of default options supported by every validator:
|
# There is also a list of default options supported by every validator:
|
||||||
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
||||||
# See <tt>ActiveModel::Validation#validates</tt> for more information
|
# See <tt>ActiveModel::Validations#validates</tt> for more information
|
||||||
def validates_format_of(*attr_names)
|
def validates_format_of(*attr_names)
|
||||||
validates_with FormatValidator, _merge_attributes(attr_names)
|
validates_with FormatValidator, _merge_attributes(attr_names)
|
||||||
end
|
end
|
||||||
|
|
|
@ -36,7 +36,7 @@ module ActiveModel
|
||||||
#
|
#
|
||||||
# There is also a list of default options supported by every validator:
|
# There is also a list of default options supported by every validator:
|
||||||
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
||||||
# See <tt>ActiveModel::Validation#validates</tt> for more information
|
# See <tt>ActiveModel::Validations#validates</tt> for more information
|
||||||
def validates_inclusion_of(*attr_names)
|
def validates_inclusion_of(*attr_names)
|
||||||
validates_with InclusionValidator, _merge_attributes(attr_names)
|
validates_with InclusionValidator, _merge_attributes(attr_names)
|
||||||
end
|
end
|
||||||
|
|
|
@ -110,7 +110,7 @@ module ActiveModel
|
||||||
#
|
#
|
||||||
# There is also a list of default options supported by every validator:
|
# There is also a list of default options supported by every validator:
|
||||||
# +:if+, +:unless+, +:on+ and +:strict+.
|
# +:if+, +:unless+, +:on+ and +:strict+.
|
||||||
# See <tt>ActiveModel::Validation#validates</tt> for more information
|
# See <tt>ActiveModel::Validations#validates</tt> for more information
|
||||||
def validates_length_of(*attr_names)
|
def validates_length_of(*attr_names)
|
||||||
validates_with LengthValidator, _merge_attributes(attr_names)
|
validates_with LengthValidator, _merge_attributes(attr_names)
|
||||||
end
|
end
|
||||||
|
|
|
@ -134,7 +134,7 @@ module ActiveModel
|
||||||
#
|
#
|
||||||
# There is also a list of default options supported by every validator:
|
# There is also a list of default options supported by every validator:
|
||||||
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+ .
|
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+ .
|
||||||
# See <tt>ActiveModel::Validation#validates</tt> for more information
|
# See <tt>ActiveModel::Validations#validates</tt> for more information
|
||||||
#
|
#
|
||||||
# The following checks can also be supplied with a proc or a symbol which
|
# The following checks can also be supplied with a proc or a symbol which
|
||||||
# corresponds to a method:
|
# corresponds to a method:
|
||||||
|
|
|
@ -29,7 +29,7 @@ module ActiveModel
|
||||||
#
|
#
|
||||||
# There is also a list of default options supported by every validator:
|
# There is also a list of default options supported by every validator:
|
||||||
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
# +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+.
|
||||||
# See <tt>ActiveModel::Validation#validates</tt> for more information
|
# See <tt>ActiveModel::Validations#validates</tt> for more information
|
||||||
def validates_presence_of(*attr_names)
|
def validates_presence_of(*attr_names)
|
||||||
validates_with PresenceValidator, _merge_attributes(attr_names)
|
validates_with PresenceValidator, _merge_attributes(attr_names)
|
||||||
end
|
end
|
||||||
|
|
|
@ -61,7 +61,7 @@ module ActiveModel
|
||||||
# The method, proc or string should return or evaluate to a +true+ or
|
# The method, proc or string should return or evaluate to a +true+ or
|
||||||
# +false+ value.
|
# +false+ value.
|
||||||
# * <tt>:strict</tt> - Specifies whether validation should be strict.
|
# * <tt>:strict</tt> - Specifies whether validation should be strict.
|
||||||
# See <tt>ActiveModel::Validation#validates!</tt> for more information.
|
# See <tt>ActiveModel::Validations#validates!</tt> for more information.
|
||||||
#
|
#
|
||||||
# If you pass any additional configuration options, they will be passed
|
# If you pass any additional configuration options, they will be passed
|
||||||
# to the class and available as +options+:
|
# to the class and available as +options+:
|
||||||
|
|
|
@ -57,7 +57,7 @@ module ActiveRecord
|
||||||
# or <tt>unless: Proc.new { |user| user.signup_step <= 2 }</tt>). The method,
|
# or <tt>unless: Proc.new { |user| user.signup_step <= 2 }</tt>). The method,
|
||||||
# proc or string should return or evaluate to a +true+ or +false+ value.
|
# proc or string should return or evaluate to a +true+ or +false+ value.
|
||||||
# * <tt>:strict</tt> - Specifies whether validation should be strict.
|
# * <tt>:strict</tt> - Specifies whether validation should be strict.
|
||||||
# See ActiveModel::Validation#validates! for more information.
|
# See ActiveModel::Validations#validates! for more information.
|
||||||
def validates_presence_of(*attr_names)
|
def validates_presence_of(*attr_names)
|
||||||
validates_with PresenceValidator, _merge_attributes(attr_names)
|
validates_with PresenceValidator, _merge_attributes(attr_names)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue