4 * @file classes/form/validation/FormValidatorEmail.inc.php
6 * Copyright (c) 2000-2009 John Willinsky
7 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
9 * @class FormValidatorEmail
10 * @ingroup form_validation
13 * @brief Form validation check for email addresses.
16 // $Id: FormValidatorEmail.inc.php,v 1.5 2009/08/11 21:59:55 mj Exp $
19 import('form.validation.FormValidatorRegExp');
21 class FormValidatorEmail
extends FormValidatorRegExp
{
22 function getRegexp() {
23 return '/^' . PCRE_EMAIL_ADDRESS
. '$/i';
28 * @see FormValidatorRegExp::FormValidatorRegExp()
30 function FormValidatorEmail(&$form, $field, $type, $message) {
31 parent
::FormValidatorRegExp($form, $field, $type, $message, FormValidatorEmail
::getRegexp());