Tiny knits from AM::Validator docs

This commit is contained in:
zzak 2023-02-06 16:39:00 +09:00
parent 77515002b5
commit 8feec6d452

@ -26,7 +26,7 @@ module ActiveModel
# end # end
# end # end
# #
# Any class that inherits from ActiveModel::Validator must implement a method # Any class that inherits from \ActiveModel::Validator must implement a method
# called +validate+ which accepts a +record+. # called +validate+ which accepts a +record+.
# #
# class Person # class Person
@ -65,7 +65,7 @@ module ActiveModel
# life cycle, and not on each validation run. # life cycle, and not on each validation run.
# #
# The easiest way to add custom validators for validating individual attributes # The easiest way to add custom validators for validating individual attributes
# is with the convenient ActiveModel::EachValidator. # is with the convenient ActiveModel::EachValidator class.
# #
# class TitleValidator < ActiveModel::EachValidator # class TitleValidator < ActiveModel::EachValidator
# def validate_each(record, attribute, value) # def validate_each(record, attribute, value)
@ -73,8 +73,8 @@ module ActiveModel
# end # end
# end # end
# #
# This can now be used in combination with the +validates+ method # This can now be used in combination with the +validates+ method.
# (see ActiveModel::Validations::ClassMethods#validates for more on this). # See ActiveModel::Validations::ClassMethods#validates for more on this.
# #
# class Person # class Person
# include ActiveModel::Validations # include ActiveModel::Validations