IPv6 constructor

IPv6({
  1. String? mal,
})

Validates IPv6 addresses using a regular expression that is suitable for manually entered IP's. Examples:

If the ipv6 field is mandatory, see ReqIPv6 or Req.

mal the error message in case of a malformed IP address; if omitted, the default message will be 'malformed IPv6 address'.

Implementation

IPv6({String? mal})
    : _ipv6Val = ((String? ipv6) {
        return (ipv6 == null || _matcher.hasMatch(ipv6))
            ? null
            : mal ?? 'malformed IPv6 address';
      });