* The cidr type holds an IPv4 or IPv6 network specification. Takes 7 or 19 bytes. * * Only available for Postgres
| 905 | * Only available for Postgres |
| 906 | */ |
| 907 | class CIDR extends ABSTRACT { |
| 908 | validate(value) { |
| 909 | if (typeof value !== 'string' || !Validator.isIPRange(value)) { |
| 910 | throw new sequelizeErrors.ValidationError(util.format('%j is not a valid CIDR', value)); |
| 911 | } |
| 912 | return true; |
| 913 | } |
| 914 | } |
| 915 | |
| 916 | /** |
| 917 | * The INET type holds an IPv4 or IPv6 host address, and optionally its subnet. Takes 7 or 19 bytes |