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

Repeat Negative Times #41

Closed
varnerac opened this issue Dec 14, 2017 · 3 comments
Closed

Repeat Negative Times #41

varnerac opened this issue Dec 14, 2017 · 3 comments
Labels
Milestone

Comments

@varnerac
Copy link

$ validate-patterns
Enter a pattern to validate: [ipv4-addr:value = '198.51.100.1/32'] REPEATS -5 TIMES

PASS: [ipv4-addr:value = '198.51.100.1/32'] REPEATS -5 TIMES

I don't think something should be allowed to repeat a negative number of times.

@gtback
Copy link
Contributor

gtback commented Jan 10, 2018

Thanks for opening this, @varnerac and sorry for not seeing it right away. I'll need to check whether this is technically allowed by the spec; if so, we probably shouldn't invalidate it here. I agree that the pattern doesn't make sense semantically :-)

@gtback
Copy link
Contributor

gtback commented Feb 26, 2018

From the spec:

x MUST be a positive integer.

So yes, we should prevent that in the validator if possible :-)

Thanks, @varnerac

@gtback
Copy link
Contributor

gtback commented Mar 12, 2018

@varnerac This should be fixed now, but if not, feel free to reopen.

@gtback gtback added the bug label Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants