Skip to content
This repository
Browse code

MINOR Code formatting in EmailField

  • Loading branch information...
commit 8369cded32f0af05fbd8b4414300195942f183a3 1 parent 1e61b76
Sean Harvey authored

Showing 1 changed file with 4 additions and 5 deletions. Show diff stats Hide diff stats

  1. 9  forms/EmailField.php
9  forms/EmailField.php
@@ -19,18 +19,17 @@ function Type() {
19 19
 	 * @param Validator $validator
20 20
 	 * @return String
21 21
 	 */
22  
-	function validate($validator){
  22
+	function validate($validator) {
23 23
 		$this->value = trim($this->value);
24  
-		
25  
-		$pcrePattern = '^[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$';
26 24
 
  25
+		$pcrePattern = '^[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$';
27 26
 
28 27
 		// PHP uses forward slash (/) to delimit start/end of pattern, so it must be escaped
29 28
 		$pregSafePattern = str_replace('/', '\\/', $pcrePattern);
30 29
 
31 30
 		if($this->value && !preg_match('/' . $pregSafePattern . '/i', $this->value)){
32  
- 			$validator->validationError(
33  
- 				$this->name,
  31
+			$validator->validationError(
  32
+				$this->name,
34 33
 				_t('EmailField.VALIDATION', "Please enter an email address."),
35 34
 				"validation"
36 35
 			);

0 notes on commit 8369cde

Please sign in to comment.
Something went wrong with that request. Please try again.