-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validations: localhost as a valid url #105
Comments
I don't think the regex would consider |
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? |
Whitelist, whitelist, whitelist! I like the white list idea. |
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. |
+1 on white_list |
Is this just while in development or is it something you'll be deploying? Would this help: #106 ? |
added the white_list feature. We'll attack the custom regex feature next (maybe tomorrow) 👍 ❓ |
Sep14 white list validation discussed in #105
Is this a desired behavior?
Thanks all for creating rmq :)
The text was updated successfully, but these errors were encountered: