1: <?php
2: /**
3: * @package Controls
4: */
5:
6: /**
7: * A subclass of TextBox that validates and sanitizes emails.
8: *
9: */
10:
11: class QEmailTextBox extends QTextBox {
12: /** @var int */
13: protected $intSanitizeFilter = FILTER_SANITIZE_EMAIL;
14: /** @var int */
15: protected $intValidateFilter = FILTER_VALIDATE_EMAIL;
16:
17: public function __construct($objParentObject, $strControlId = null) {
18: parent::__construct($objParentObject, $strControlId);
19: $this->strLabelForInvalid = QApplication::Translate('Invalid Email Address');
20: $this->strTextMode = QTextMode::Email;
21: }
22: }