Utility to validate network-related input fields
npm install net-validations
This utility contains a series of functions raising errors in case their input is not valid.
validateAS("onions");
// will throw Error("The Autonomous System number format is not valid. It must be an integer.")
validateASpath([2914, 3333, 1234]);
validateVRP({prefix: "192.0.2.0/24", maxLength: 28, asn: 65536});
- validatePrefix
- validateIP
- validateAS
- validateASpath
- validateVRP