Project

General

Profile

« Previous | Next » 

Revision b8678b63

Added by Phil Davis over 8 years ago

IPv6 address can contain a dot

When requiring the entry of an IPv6 address, the regex pattern should still allow a dot, so that an IPv6 address can be entered in the format that has an IPv4-address-like part at the end:
aa:bb:cc:dd:ee:ff:1.2.3.4
which is a valid way to choose to specify an IPv6 address.

View differences:

src/usr/local/www/classes/Form/IpAddress.class.php
39 39
				break;
40 40

  
41 41
			case "V6":
42
				$this->_attributes['pattern'] = '[a-fA-F0-9:]*';
42
				$this->_attributes['pattern'] = '[a-fA-F0-9:.]*';
43 43
				$this->_attributes['title'] = 'An IPv6 address like 1:2a:3b:ffff::1';
44 44
				break;
45 45
		}

Also available in: Unified diff