2

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

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:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.