I have an url field,
- width: 3/4
label: External Link
On localhost, the following url gives no problem when entering it into the field, saving the page, or making it public:
…but on the staging sever, the same url gives an error only when trying to make the page public which I am not sure is the expected behaviour , I would expect the error to hit me when saving the page, not when making it public:
Sooo… what’s going on ?
Kirby does not validate page while in draft state, therefore you will only get the error when you publish a page.
As to why it works locally but not on the remote server, I can’t tell.
I tested directly the regex in the url function of the V class, and it seems that the triple hyphen in the url makes it invalid (actually anything more than one hyphen in ‘flash—art’)
So it is working as it should in staging, so I guess the question is why isn’t the validation working localhost ?
In my local environment (Mac with Laravel Valet):
$url = 'https://flash---art.com/2021/05/kw-digital-with-the-last-museum-a-website-specific-exhibition/#';
But in any case, this this URL exists and only the validator fails, you wouldn’t win much.