ActiveRecord::Validator vs ActiveModel::Validator

I know that there is an ActiveModel Validator class

which is used for the class level validation macros.

But I didn't find a an ActiveRecord Validator class.

ActiveModel to leave ActiveRecord as an ORM.

So now I see this Rails 3 code in a Rails 3 book and get confused:

Class EmailValidator < ActiveRecord::Validator
  def validate()
    email_field = options[:attr]
    record.errors[email_field] << “is not valid” unless
record.send(email_field) =~ /^[a-z]$/

class Account < ActiveRecord::Base
  validates_with EmailValidator, :attr => :email

Where is this ActiveRecord::Validator coming from? Also why does it
exist when you can simply do this in ActiveModel:

class RandomlyValidator < ActiveModel::Validator
  def validate(record)
    record.errors[:base] << “FAIL #1” unless first_hurdle(record) #add
error messages to the whole object instead of a particular attribute
using the :base key.
    record.errors[:base] << “Fail #2” unless second_hurdle(record)
    record.errors[:base] << “Fail #3” unless third_hurdle(record)


  def first_hurdle(record)
    rand > 0.3

  def second_hurdle(record)
    rand > 0.6

  def third_hurdle(record)
    rand > 0.9

class Report < ActiveRecord::Base
  validates_with RandomlyValidator

thanks for response