title: Rails validating values in array
body: <p>In my Schedule model I want to add some validation to the :wdays field, which is an int[]. I only want values 0..6 to be valid</p>
  
  <p>Valid</p>
  
  <pre><code>Schedule.wdays = [0,1,6]
  </code></pre>
  
  <p>Invalid</p>
  
  <pre><code>Schedule.wdays = [0,1,10]
  </code></pre>
  
  <p>I tried using</p>
  
  <pre><code>validates :wdays, inclusion: { in: [0, 1, 2, 3, 4, 5, 6] }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>validates :wdays, inclusion: { in: 0..6 }
  </code></pre>
  
  <p>but neither works</p>
  
  <p>What is the proper way to validate the values in an array in your model?</p>