URI validation problem
This is an open discussion with 1 reply, filed under Troubleshooting.
Search
Your example is perfectly valid, so the problem is probably with Symphony. Just check that there's no whitespace in the URL, otherwise that will cause the regex to fail.
/^[^:.\/?#\s]+:(?:\/{2,3})?[^.\/?#\s]+(?:\.[^.\/?#\s]+)*(?:\/[^?#\s]*\??[^?#\s]*(?:#[^#\s]*)?)?$/
That's the regex Symphony uses. I made some slight modifications, so you might like to try pasting the above into the "Validation Rule" field, but I don't think that will help.
/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/
This is the regex from RFC 2396, which might work better. It will accept things that Symphony's regex won't.
Otherwise if those don't work, I suspect there could be a problem with PHP parsing the regex. There might be some information in /manifest/logs/
about the error.
Create an account or sign in to comment.
Hi there,
First time installing S2 and I set up a section with two text fields, one of which I 'URI' validation. It won't save any URL's though? I'm putting in for example: 'http://www.bbc.com' and it says Some errors were encountered while attempting to save. Other fields save fine? What am I missing?
AL