Answers.Body: <p>Currently, Sprout Fields Phone Field only supports a single mask.</p>
  
  <p>If you need more advanced pattern support, a Regex Field Type is probably the way to go.</p>
  
  <p>Here is one that came up in my search:</p>
  
  <ul>
  <li><a href="https://github.com/marionnewlevant/craft-mn_matchinput" rel="nofollow">mn_matchinput</a></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-08T15:08:56.497Z
Answers.LastActivityDate: 2016-06-08T15:08:56.497Z
Answers.UserDisplayName: Ben Parizek
Body: <p>Is there a way to include multiple validation masks in Sprout Fields? I've tried to do this (for my phone number validation):</p>
  
  <pre><code>#### ####|### ## ###
  </code></pre>
  
  <p>Since both of those are valid. If I try to write it out as a real regular expression, like this:</p>
  
  <pre><code>^([0-9]{4}) ([0-9]{4})|([0-9]{3}) ([0-9]{2}) ([0-9]{3})$
  </code></pre>
  
  <p>it just fails: <code>preg_match(): Empty regular expression</code></p>
  
Tags: <plugin-sproutforms>
Title: Multiple regexes/masks in Sprout Field validation
ThreadText: # Multiple regexes/masks in Sprout Field validation
  
  (Asked by: username_0 on 2016-06-08)
  
  Is there a way to include multiple validation masks in Sprout Fields? I've tried to do this (for my phone number validation):
  
  ```
  #### ####|### ## ###
  
  ```
  
  Since both of those are valid. If I try to write it out as a real regular expression, like this:
  
  ```
  ^([0-9]{4}) ([0-9]{4})|([0-9]{3}) ([0-9]{2}) ([0-9]{3})$
  
  ```
  
  it just fails: `preg_match(): Empty regular expression`
  
  **Tags:** plugin-sproutforms
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-06-08. Score: 1
  
  Currently, Sprout Fields Phone Field only supports a single mask.
  
  If you need more advanced pattern support, a Regex Field Type is probably the way to go.
  
  Here is one that came up in my search:
  
  * [mn\_matchinput](https://github.com/marionnewlevant/craft-mn_matchinput)
  
  
  ---
  
  