Add IP Address Validation#458
Add IP Address Validation#458DavidTPate wants to merge 1 commit intohapijs:masterfrom DavidTPate:ip-support
Conversation
…sses, all IPv4 (CIDR optional) Address, all IPv6 (CIDR optional) address, and all IPvFuture addresses
|
There's a policy in hapi projects not to depend on sub 1.x dependencies. |
|
No particular reason why I didn't contribute, I had taken a look through some of the other validation modules and noticed that in general they were not very supportive of the various specifications around IP addresses. I understand the policy you mentioned, I'll look into contributing to the |
Other validation modules usually have support for custom functions, where you can add ip validation as a plugin. |
|
@DavidTPate do you think we could do the same work here as uri ? |
|
@Marsup Yeah, that's what I was planning to do next. It looks like I lost that branch at some point. So I'll close this PR and take of it in another one once I have it done. |
|
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 Pull Request adds functionality for validating strings either as a generic IP address (IPv4 (CIDR optional), IPv6 (CIDR optional), or IPvFuture). The validation is done off of the related RFCs (RFC 791 (IPv4) RFC 4291 (IPv6) and RFC 4632 (CIDR)) and provides the standard error messages to the library.