Hi, I have reviewed many search results and the ones i found that offered any resolve do not work.
i have been working on adding a weburl custom field with a custom regex, the regex is good as i used it on other sites for php preg_match but i cannot get it to work for this custom field.
For the field i chose shortanswer which in the db a text field is 255 so there is plenty of room. I also checked and found that the input type (new TextboxField) is limted to 100 in class.forms.php on line 1482 so that is not an issue as this regex is well short of that.
'configuration'=>array('size'=>40, 'length'=>100),
I have tried without the beginning and ending \ , with only the beginning \ and no ^, with only the beginning \ and ^, and without any beginning or ending slash or ^ and it will not accept anything.
I have tried the following:
/^https?:\/\/[a-z0-9-]{2,63}(\.[a-z0-9-]{2,})*(:[0-9]{0,5})?(\/|$)\S*$/
/https?:\/\/[a-z0-9-]{2,63}(\.[a-z0-9-]{2,})*(:[0-9]{0,5})?(\/|$)\S*$
/^https?:\/\/[a-z0-9-]{2,63}(\.[a-z0-9-]{2,})*(:[0-9]{0,5})?(\/|$)\S*$
/https?:\/\/[a-z0-9-]{2,63}(\.[a-z0-9-]{2,})*(:[0-9]{0,5})?(\/|$)\S*$/
^https?:\/\/[a-z0-9-]{2,63}(\.[a-z0-9-]{2,})*(:[0-9]{0,5})?(\/|$)\S*$
I have not been able to find anything in search to help me.. It is not giving me an error on the page, it just fails with a message in the console that says
XHR failed loading: POST "https://example.com/my_tickets/scp/ajax.php/form/field-config/37".
However it accepts this regex no problem without error...
[\p{Lu}\p{Ll}][\p{Lu}\p{Ll}0-9.,\-_]+
but this is not what i want as it is not the right regex for this url field (it accepts too many character variations)