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:
commit
c3fc00e005
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue