1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #17319 from igas/fix-17318

fix wrong example from #17318 [ci skip]
This commit is contained in:
Matthew Draper 2014-10-19 23:45:22 +10:30
commit 0dfc4fa177

View file

@ -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
```