@@ -12,37 +12,37 @@ |
||
12 | 12 | */ |
13 | 13 | class EE_Email_Field extends EE_Text_Field_Base |
14 | 14 | { |
15 | - /** |
|
16 | - * @param string $table_column |
|
17 | - * @param string $nicename |
|
18 | - * @param bool $nullable |
|
19 | - * @param null $default_value |
|
20 | - */ |
|
21 | - public function __construct($table_column, $nicename, $nullable, $default_value = null) |
|
22 | - { |
|
23 | - parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
24 | - $this->setSchemaFormat('email'); |
|
25 | - } |
|
15 | + /** |
|
16 | + * @param string $table_column |
|
17 | + * @param string $nicename |
|
18 | + * @param bool $nullable |
|
19 | + * @param null $default_value |
|
20 | + */ |
|
21 | + public function __construct($table_column, $nicename, $nullable, $default_value = null) |
|
22 | + { |
|
23 | + parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
24 | + $this->setSchemaFormat('email'); |
|
25 | + } |
|
26 | 26 | |
27 | 27 | |
28 | - /** |
|
29 | - * In form inputs, we should have called htmlentities and addslashes() on form inputs, |
|
30 | - * so we need to undo that on setting of these fields |
|
31 | - * |
|
32 | - * @param string $email_address |
|
33 | - * @return string |
|
34 | - */ |
|
35 | - function prepare_for_set($email_address) |
|
36 | - { |
|
37 | - $loader = new Loader(); |
|
38 | - $validation_service = $loader->getShared( |
|
39 | - 'EventEspresso\core\domain\services\validation\EmailValidationServiceInterface' |
|
40 | - ); |
|
41 | - try { |
|
42 | - $validation_service->validate($email_address); |
|
43 | - return $email_address; |
|
44 | - } catch (EmailValidationException $e) { |
|
45 | - return ''; |
|
46 | - } |
|
47 | - } |
|
28 | + /** |
|
29 | + * In form inputs, we should have called htmlentities and addslashes() on form inputs, |
|
30 | + * so we need to undo that on setting of these fields |
|
31 | + * |
|
32 | + * @param string $email_address |
|
33 | + * @return string |
|
34 | + */ |
|
35 | + function prepare_for_set($email_address) |
|
36 | + { |
|
37 | + $loader = new Loader(); |
|
38 | + $validation_service = $loader->getShared( |
|
39 | + 'EventEspresso\core\domain\services\validation\EmailValidationServiceInterface' |
|
40 | + ); |
|
41 | + try { |
|
42 | + $validation_service->validate($email_address); |
|
43 | + return $email_address; |
|
44 | + } catch (EmailValidationException $e) { |
|
45 | + return ''; |
|
46 | + } |
|
47 | + } |
|
48 | 48 | } |