Code Monkey home page Code Monkey logo

Comments (10)

willrax avatar willrax commented on June 28, 2024

I don't think the regex would consider http://localhost a legitimate url. You would need a .tld on the end of it.

from rmq.

GantMan avatar GantMan commented on June 28, 2024

Hrmmmm, I agree it's not really a valid URL. But I also see how it can be an issue. Consider the following suggestions for something we should add: What would be best for RMQ users?

# this would be the quick fix, to add some simple shotcircuit
rmq.validation.valid?("http://localhost", :url, localhost: true) #=> true 

# Then again... this would be interesting
rmq.validation.valid?("http://localhost", :url, white_list: ["http://localhost", "https://localhost"]) #=> true

# but then maybe whitelist should be for ANY validation?
rmq.validation.valid?("ZERO", :number, white_list: ["ZERO"]) #=> true

thoughts?

from rmq.

willrax avatar willrax commented on June 28, 2024

Whitelist, whitelist, whitelist! I like the white list idea.

from rmq.

vaughankg avatar vaughankg commented on June 28, 2024

The white_list is definitely nice and flexible although in this case I'd really want to validate localhost + any port number -- which would be impractical.

from rmq.

twerth avatar twerth commented on June 28, 2024

+1 on white_list

from rmq.

willrax avatar willrax commented on June 28, 2024

Is this just while in development or is it something you'll be deploying? Would this help: #106 ?

from rmq.

vaughankg avatar vaughankg commented on June 28, 2024

@willrax It's something that I'll be deploying, where the user gets to specify an API end point to hit. A custom validation as per #106 definitely solves for my use case.

from rmq.

GantMan avatar GantMan commented on June 28, 2024

added the white_list feature. We'll attack the custom regex feature next (maybe tomorrow) 👍 ❓

from rmq.

GantMan avatar GantMan commented on June 28, 2024

Documented: http://rubymotionquery.com/document/validation-with-rmq/

from rmq.

GantMan avatar GantMan commented on June 28, 2024

closed via #107, #108, #109

from rmq.

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.