title: How do I validate members of an array field?
body: <p>I have this model:</p>
  
  <pre><code>class Campaign
  
    include Mongoid::Document
    include Mongoid::Timestamps
  
    field :name, :type =&gt; String
    field :subdomain, :type =&gt; String
    field :intro, :type =&gt; String
    field :body, :type =&gt; String
    field :emails, :type =&gt; Array
  end
  </code></pre>
  
  <p>Now I want to validate that each email in the <code>emails</code> array is formatted correctly. I read the Mongoid and ActiveModel::Validations documentation but I didn't find how to do this.</p>
  
  <p>Can you show me a pointer?</p>