Giter Site home page Giter Site logo

Comments (4)

adam-jones-net avatar adam-jones-net commented on May 27, 2024

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.

from acf-website-field.

adam-jones-net avatar adam-jones-net commented on May 27, 2024

+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!

from acf-website-field.

Woolball avatar Woolball commented on May 27, 2024

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.

from acf-website-field.

Jeradin avatar Jeradin commented on May 27, 2024

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.

from acf-website-field.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.