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:
commit
0dfc4fa177
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
|
```ruby
|
||||||
class Person < ActiveRecord::Base
|
class Person < ActiveRecord::Base
|
||||||
validates_each :name, :surname do |record, attr, value|
|
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
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue