README.md in active_validation-4.0.5 vs README.md in active_validation-4.0.6
- old
+ new
@@ -48,10 +48,11 @@
* [Password](#passwordvalidator)
* [Phone](#phonevalidator)
* [SEDOL](#sedolvalidator)
* [Slug](#slugvalidator)
* [SSN](#ssnvalidator)
+* [Time Zone](#timezonevalidator)
* [Tracking Number](#trackingnumbervalidator)
* [Type](#typevalidator)
* [URL](#urlvalidator)
* [Username](#usernamevalidator)
* [UUID](#uuidvalidator)
@@ -913,9 +914,43 @@
```ruby
describe User do
it { should ensure_valid_ssn_format_of(:ssn) }
it { should_not ensure_valid_ssn_format_of(:name) }
+end
+```
+
+## TimeZoneValidator
+
+**Ex:** 'America/New_York' or 'London'
+
+**Rules:**
+* Any valid time zone
+
+With an ActiveRecord model:
+
+```ruby
+class User < ActiveRecord::Base
+ attr_accessor :time_zone, :name
+ validates :time_zone, time_zone: true
+```
+
+Or any ruby class:
+
+```ruby
+class User
+ include ActiveModel::Validations
+ attr_accessor :time_zone, :name
+ validates :time_zone, time_zone: true
+end
+```
+
+RSpec matcher is also available for your convenience:
+
+```ruby
+describe User do
+ it { should ensure_valid_type_format_of(:time_zone) }
+ it { should_not ensure_valid_type_format_of(:name) }
end
```
## TrackingNumberValidator