Giter VIP home page Giter VIP logo

Comments (5)

gregpriday avatar gregpriday commented on May 23, 2024

Assume that would mean just checking for a field with numbers dashes and a
plus? There must be a decent PHP phone number checking snippet out there.
On Mon, 06 Jun 2016 at 7:54 PM Andrew Misplon [email protected]
wrote:

@adiraomj https://github.com/adiraomj Sorry for missing this. Please,
can we make the Tel field a bit smarter, just like the email field? Can
we make it accept a URL if one is entered and only prepend tel if a phone
number is detected?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#73, or mute the thread
https://github.com/notifications/unsubscribe/ABExy426vAekDXhHsfkLuPkZA1tsq3a1ks5qJF7vgaJpZM4IvJl0
.

from vantage.

adiraomj avatar adiraomj commented on May 23, 2024

What we can do is use PHP's FILTER_VALIDATE_URL to validate url. If it fails we can display tel:. What do you think?

from vantage.

Misplon avatar Misplon commented on May 23, 2024

I'm cool with doing that way around. @gregpriday ?

from vantage.

adiraomj avatar adiraomj commented on May 23, 2024

@Misplon I just went through out code again. The logic does use FILTER_VALIDATE_URL to check for a url.

However for FILTER_VALIDATE_URL to return true, the url must use http:// or https://.

So for example:
https://siteorigin.com - Passes
http://siteorigin.com - Passes
siteorigin.com - Fails

https://github.com/siteorigin/vantage/blob/develop/inc/widgets.php#L321

from vantage.

Misplon avatar Misplon commented on May 23, 2024

@adiraomj My bad for not testing that. Cool, this is fine, let's leave it. Thanks man.

from vantage.

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.