Functiondojox.validate.isIpAddress

dojo.require("dojox.validate.web");
defined in dojox/validate/web.js

Supports 5 formats for IPv4: dotted decimal, dotted hex, dotted octal, decimal and hexadecimal. Supports 2 formats for Ipv6.

Usage

function (/*String*/ value, /*Object?*/ flags) (view source)
parametertypedescription
valueStringA string.
flagsObjectOptional. allowHybrid IPv6 address written as six groups of four hexadecimal digits followed by the usual 4 dotted decimal digit notation of IPv4. x:x:x:x:x:x:d.d.d.d