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

Merge pull request #17318 from igas/guides-more-friendly-for-nonlatin

make guides example more friendly to nonlatin langs [ci skip]
This commit is contained in:
Abdelkader Boudih 2014-10-19 13:33:22 +01:00
commit c3fc00e005

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[a-z]/
record.errors.add(attr, 'must start with upper case') if value =~ /\A[[:alpha:]]/
end
end
```