Revision 6cade780
Added by Phil Davis over 8 years ago
src/usr/local/www/classes/Form/IpAddress.class.php | ||
---|---|---|
71 | 71 |
break; |
72 | 72 |
|
73 | 73 |
case "V6": |
74 |
$this->_attributes['pattern'] = '[a-fA-F0-9:]*'; |
|
74 |
$this->_attributes['pattern'] = '[a-fA-F0-9:.]*';
|
|
75 | 75 |
$this->_attributes['title'] = 'An IPv6 address like 1:2a:3b:ffff::1'; |
76 | 76 |
break; |
77 | 77 |
} |
Also available in: Unified diff
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.
(cherry picked from commit b8678b6385a9ba245e92a06b19cfa397873eef77)