Skip to content

Variable: ipv4

ts
const ipv4: Validator<string>;

IPv4 validation / IPv4 验证

Example

ts
ipv4('192.168.1.1') // => { isValid: true, message: undefined }
ipv4('999.0.0.1') // => { isValid: false, message: 'Invalid IPv4 address / IPv4地址格式无效' }

Since

1.0.0

Released under the MIT License.