title: Rails validates_format_of with Regex fails in case of new line
body: <p>I am trying to validate a alphanumeric input which allow whitespaces and new lines</p>
  
  <pre><code> validates_format_of :field, with: /^[a-zA-Z0-9 ]*$/, multiline: true, allow_blank: true
  </code></pre>
  
  <p>in my form I enter this input:</p>
  
  <p><a href="https://i.stack.imgur.com/tC1zt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tC1zt.png" alt="input"></a></p>
  
  <p>And its accepted and pass the validation</p>
  
  <p>The desired behavior is to only accept alphanumeric text (allow blank) and accept spaces/new-lines anywhere in the text. So only reject input if contain any alphanumeric char </p>