top of page
Anchor 1
Last Updated on :  
Friday 28 January, 2022

Validate URL input in WIX using regex/pattern



 

In this tutorial we will learn how to add the pattern validation to the URL user input field. This will be useful for member areas, where user has to share his social media or professional network link and admin wants to make the exact site link required.

The task will be to allow user to put only https://tanacadmy.com links



Lets begin...


  • As we all know, Wix gives an opportunity to choose the type of input. We will use URL type in that tutorial. The same(or similar) regex can be used with other input types.


  • Let’s addpattern validation in the Input Settings. I use that one: http[s]{0,1}://[w]{0,3}[.]{0,1}tanacadmy.com/.{1,64}


  1. What we have here? [s]{0,1} —’ s’ symbol can be used once or not used at all. You can use [s]? too. *this was done to handle both http:// and https://

  2. [w]{0,3} — w symbol can be used zero or three times [.]{0,1} — ‘.’ symbol can be used once or not used at all * those was done to handle www and non-www versions

  3. .{1,64} — at the end we will have from 1 to 64 any symbols. *this was done to avoid using just https://www.tanacadmy.com/ URL



Thanks for reading! Let us know if you have any questions ♥

We have an awesome team who will help you with any task in Wix.

Logo_edited.png
Disclaimer

Our free and premium content is non-exclusive, meaning you are not the only one with access to the content. You can customize our content to fit your end product. Redistribution of our content is strictly prohibited. This means you cannot make our content available to others as-is, stand-alone products, or stock products in ANY LANGUAGE, regardless if you offer our content for free or not.

© 2025 WixCodable.com | All Rights Reserved

bottom of page