Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/isIP.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const IPv6AddressRegExp = new RegExp('^(' +
`(?:${IPv6SegmentFormat}:){2}(?:(:${IPv6SegmentFormat}){0,3}:${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,5}|:)|` +
`(?:${IPv6SegmentFormat}:){1}(?:(:${IPv6SegmentFormat}){0,4}:${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,6}|:)|` +
`(?::((?::${IPv6SegmentFormat}){0,5}:${IPv4AddressFormat}|(?::${IPv6SegmentFormat}){1,7}|:))` +
')(%[0-9a-zA-Z-.:]{1,})?$');
')(%[0-9a-zA-Z.]{1,})?$');

export default function isIP(ipAddress, options = {}) {
assertString(ipAddress);
Expand Down
1 change: 1 addition & 0 deletions test/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ describe('Validators', () => {
});
});


it('should validate isIPRange', () => {
test({
validator: 'isIPRange',
Expand Down
Loading