Bug #6089 ยป bug_6089.diff

Jochen Rau, 2010-01-19 00:21

View differences:

Packages/Framework/FLOW3/Tests/Unit/Validation/Validator/EmailAddressValidatorTest.php (Arbeitskopie)
67 67
	public function invalidAddresses() {
68 68
		return array(
69 69
			array('andreas.foerthner@'),
70
			array('andreas@foerthner@example.com'),
70 71
			array('@typo3.org'),
71 72
			array('someone@typo3.'),
72 73
			array('local@192.168.2'),
Packages/Framework/FLOW3/Classes/Validation/Validator/EmailAddressValidator.php (Arbeitskopie)
134 134
		$this->errors = array();
135 135
		if(is_string($value) && preg_match('
136 136
				/
137
					[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*
137
					^[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*
138 138
					@
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)|
    (1-1/1)