diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index 332af44e79..1c1b863fe9 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -706,7 +706,7 @@ we don't want names and surnames to begin with lower case. ```ruby class Person < ActiveRecord::Base validates_each :name, :surname do |record, attr, value| - record.errors.add(attr, 'must start with upper case') if value =~ /\A[[:alpha:]]/ + record.errors.add(attr, 'must start with upper case') if value =~ /\A[[:lower:]]/ end end ```