4 * @file classes/form/validation/FormValidatorPost.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 FormValidatorPost
10 * @ingroup form_validation
12 * @brief Form validation check to make sure the form is POSTed.
15 // $Id: FormValidatorPost.inc.php,v 1.3 2009/04/08 21:34:54 asmecher Exp $
18 import ('form.validation.FormValidator');
20 class FormValidatorPost
extends FormValidator
{
23 * @see FormValidator::FormValidator()
24 * @param message string the locale key to use (optional)
26 function FormValidatorPost(&$form, $message = 'form.postRequired') {
27 parent
::FormValidator($form, 'dummy', 'required', $message);
31 * Check if field value is valid.
32 * Value is valid if it is empty and optional or matches regular expression.
36 return Request
::isPost();