Skip to content

Commit

Permalink
ActiveModel Validations Inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
eiel committed Jan 2, 2015
1 parent bdc6bec commit adf10a4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions active_model/validations/inclusion.md
@@ -0,0 +1,17 @@
---
title: ActiveModel::Validations::Inclusion
---

```
$ ruby -v
ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin14.0]
```

```
$ bundle exec ruby -r rails -e 'puts Rails.version'
4.2.0
```

* [ソースコード](https://github.com/rails/rails/blob/v4.2.0/activemodel/lib/active_model/validations/inclusion.rb)

[ExclusionValidator](/active_model/validations/exclusion)の逆で、inオプションに指定した範囲内の値であれば正常な値と判断されるバリデータ。

0 comments on commit adf10a4

Please sign in to comment.