• But is it possible to add a different phone number validation?

    // Pattern that allows digits, +, (), -, and spaces?$pattern?=?"/^(\+?\d{1,4}[\s-]?)?(\(?\d{3,4}\)?[\s-]?)?\d{3}[\s-]?\d{3,4}$/";

    So it works with different phone numbers

    Example of valid phone numbers:

    • +44 123 456-7890
    • +1 (123) 456-7890
    • (012) 345 6789
    • 494-934-128
    • 123 456 7890
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kaisar Ahmmed

    (@kaisarahmmed)

    Hi @zubsero

    You can use this pattern for validate your phone number.

    ^(\+?\d{1,4}[\s-]?)?(\(?\d{3,4}\)?[\s-]?)?\d{3}[\s-]?\d{3,4}$

    Don’t use ‘/’ before and after of regular expression.

    Go to the “Advanced” tab in the text field settings and enable “Real-Time Validation.” You’ll find a regular expression box and a validation message box.

    I hope this helps!

    Thanks a lot.

    Thread Starter zubsero

    (@zubsero)

    Great, thanks! Got a bit confused first since I use a dedicated phone field, not a single line text ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this review.