Add IP Address Validation#607
Closed
DavidTPate wants to merge 1 commit intohapijs:6.1.0from
DavidTPate:ip-validation
Closed
Add IP Address Validation#607DavidTPate wants to merge 1 commit intohapijs:6.1.0from DavidTPate:ip-validation
DavidTPate wants to merge 1 commit intohapijs:6.1.0from
DavidTPate:ip-validation
Conversation
…ure with or without a CIDR.
Collaborator
|
I'll take care of that this weekend, sorry for the delay. |
Contributor
Author
|
Sounds good, thanks @Marsup ! |
Collaborator
|
This can be vastly improved. This is not the kind of thing that can wholly fit into string anymore. Can you create a string subfolder containing 3 files : code that's specific for ip, uri, and what's common between them ? I don't feel confident about the maintainability of the code as it is. |
Contributor
Author
|
@Marsup Sure thing. That was one of my concerns as well, this logic isn't short and sweet like most of the other pieces of validation. |
Contributor
Author
|
Closing this as it is being covered in #619 |
|
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to do IP address validation for IPv4, IPv6, and IPvFuture addresses along with a configurable part for if a CIDR is optional/required/forbidden for the validation. It includes appropriate tests and documentation.
It takes care of the original PR #458