title: Validate phone-number format in Rails 4 - REGEX
body: <p>I'm working on a small project where the user should type the phone numbers, so I would like to validate that information using the "<a href="https://github.com/DavyJonesLocker/client_side_validations" rel="nofollow">ClientSideValidations</a>" gem.</p>
  
  <pre><code>validates_format_of :telcasa, :celular, :tel_flia, :tel_trab, :tel_ref_2, :tel_ref_1, 
      length: { in: 10 },
      :with =&gt; /\A(\d{10}|\(?\d{3}\)?[-. ]\d{3}[-.]\d{4})\z/,
      :message =&gt; "Formato invalido"
  </code></pre>
  
  <p>But, for the region where this project is going to be used I have to validate the three first numbers of the phone that correspond to the area code ("809"/"829"/"849"). How can I validate that the user correctly typed the phone number with one of the three area codes?</p>