4 * @file classes/form/validation/FormValidatorAlphaNum.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 FormValidatorAlphaNum
10 * @ingroup form_validation
13 * @brief Form validation check for alphanumeric (plus interior dash/underscore) characters only.
16 // $Id: FormValidatorAlphaNum.inc.php,v 1.3 2009/04/08 21:34:54 asmecher Exp $
19 import('form.validation.FormValidatorRegExp');
21 class FormValidatorAlphaNum
extends FormValidatorRegExp
{
25 * @see FormValidatorRegExp::FormValidatorRegExp()
27 function FormValidatorAlphaNum(&$form, $field, $type, $message) {
28 parent
::FormValidatorRegExp($form, $field, $type, $message,
29 '/^[A-Z0-9]+([\-_][A-Z0-9]+)*$/i'