Bug #6806 » EmailAddressValidator.patch

Falk Kühnel, 2010-03-12 11:13

View differences:

Packages/Framework/FLOW3/Classes/Validation/Validator/EmailAddressValidator.php (working copy)
139 139
					(?:
140 140
						(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2}|aero|asia|biz|cat|com|edu|coop|gov|info|int|invalid|jobs|localdomain|mil|mobi|museum|name|net|org|pro|tel|travel)|
141 141
						localhost|
142
						(?:(?:\d{1,2}|1\d{1,2}|2[0-5][0-5])\.){3}(?:(?:\d{1,2}|1\d{1,2}|2[0-5][0-5]))
142
						(?:(?:\d{1,2}|1\d{1,2}|2[0-4][0-9]|25[0-5])\.){3}(?:(?:\d{1,2}|1\d{1,2}|2[0-4][0-9]|25[0-5]))
143 143
					)
144 144
				$/Dix', $value)) return TRUE;
145 145
		$this->addError('The given subject was not a valid email address. Got: "' . $value . '"', 1221559976);
Packages/Framework/FLOW3/Tests/Unit/Validation/Validator/EmailAddressValidatorTest.php (working copy)
44 44
			array('info@guggenheim.museum'),
45 45
			array('just@test.invalid'),
46 46
			array('just+spam@test.de'),
47
			array('just+spam@192.168.249.100'),
47 48
			array('local@192.168.0.2')
48 49
		);
49 50
	}
    (1-1/1)