Closed Woolball closed 9 years ago
This is a quick fix and doesn't solve all issues, in fact it makes more issues.
1) compatibility on old browsers 2) the specification for browers url validation that is run when a field is set to type="url" ensures that the url you enter MUST start with http://, https:// etc. Yet this is in direct contradiction to how the plugin currently works. As anyone who uses the plugin will have seen, a tip on screen states you don't have to add http as it will be done by the plugin if needed.
+1 though for a propper fix on this! The sole reason I downloaded the plugin was to have an ACF field that included url validation and this doesn't do it!
Yes, you are right.
One possibility is to use a regular expression. There is a lot of choice on this front as it appears that url validation is not simple to achieve for the general case: http://mathiasbynens.be/demo/url-regex
I ended up using a simple regular expression with a custom-generated form field.
Sorry for the long delay, if anyone is still using this it now validates in the admin section and also uses HTML5 type="url" for validation.
Thanks for the plugin :)
It is possible to add simple HTML input validation by setting the input field type to "url".
Commit: 972c3e60da6c3d2656cb98638e9194d7d1dd4143 Location: website_url.php (line: 168) Suggested modification: