Skip to content
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

regex error is useless #52

Open
jonthegeek opened this issue Aug 25, 2023 · 0 comments
Open

regex error is useless #52

jonthegeek opened this issue Aug 25, 2023 · 0 comments
Milestone

Comments

@jonthegeek
Copy link
Owner

# Try to check a url.
stbl::stabilize_chr_scalar(
  "not a url",
  regex = "http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+"
)
#> Error:
#> ! `"not a url"` must match the provided regex pattern.
#> ✖ Some values do not match.
#> • Locations: 1

Created on 2023-08-25 with reprex v2.0.2

At a minimum we should show the regex pattern. Somewhere in the hierarchy we should allow the user to provide a better definition of the object they're asking us to validate, probably (cuz "must be a url" would be way clearer).

@jonthegeek jonthegeek added this to the v0.1 milestone Aug 25, 2023
@jonthegeek jonthegeek modified the milestones: v0.1, v0.2 Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant