title: Is it possible to require multiple strong params in Rails?
body: <p>I'm trying to do some server-side validation for a form in Rails, and I would like to require specific fields to have a value. Here are the params in my controller:</p>
  
  <pre><code>private
  def post_params
    params.require(:post).permit(:title, :text, :slug)
  end
  </code></pre>
  
  <p>The problem is that the server merely <em>permits</em> these params — it doesn't require them, so it's possible to submit a completely blank form.</p>
  
  <p>My understanding is that <code>params.require</code> only accepts one argument, and I've tried getting around this with no success:</p>
  
  <pre><code>private
  def post_params
    params.require(:post, :title, :text, :slug)
  end
  # =&gt; wrong number of arguments (4 for 1)
  
  private
  def post_params
    all_params = [:post, :title, :text, :slug]
    params.require(all_params)
  end
  # =&gt; param is missing or the value is empty: [:post, :title, :text, :slug]
  
  private
  def post_params
    params.require(:post).require(:title).require(:text).require(:slug)
  end
  # =&gt; private method `require' called for "test thing":String
  </code></pre>
  
  <p>Is there any way to require multiple strong params?</p>