AnsweredAssumed Answered

Validate url in forms using regex

Question asked by bsieloff on Dec 1, 2017
Latest reply on Dec 6, 2017 by bsieloff

Hello,

 

I'm trying to validate that a user enters a URL in a text field.  I am trying to use regex validation with the following string.

 

^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$

 

It works on a regex tester but not on the form.  Is there something I need to do to use it on the form, or is the pattern bumpkis?

 

Thanks for your help!

 

 

 

Outcomes