Revision: 28
http://svn.sourceforge.net/pieforms/?rev=28&view=rev
Author: oracleshinoda
Date: 2006-11-18 04:33:21 -0800 (Sat, 18 Nov 2006)
Log Message:
-----------
Fixed the required rule
Modified Paths:
--------------
pieforms/src/pieform/rules/required.php
Modified: pieforms/src/pieform/rules/required.php
===================================================================
--- pieforms/src/pieform/rules/required.php 2006-11-18 12:30:17 UTC (rev 27)
+++ pieforms/src/pieform/rules/required.php 2006-11-18 12:33:21 UTC (rev 28)
@@ -1,6 +1,6 @@
<?php
/**
- * This program is part of Mahara
+ * This program is part of Pieforms
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,26 +16,23 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * @package mahara
- * @subpackage form-rule
+ * @package pieform
+ * @subpackage rule
* @author Nigel McNie <ni...@ca...>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
- * @copyright (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
+ * @copyright (C) 2006 Catalyst IT Ltd http://catalyst.net.nz
*
*/
-defined('INTERNAL') || die();
-
/**
* Checks whether the field has been specified.
*
- * @param Form $form The form the rule is being applied to
- * @param string $field The field to check
- * @param array $element The element to check
- * @return string The error message, if the value is invalid.
+ * @param Pieform $form The form the rule is being applied to
+ * @param string $field The field to check
+ * @param array $element The element to check
+ * @return string The error message, if the value is invalid.
*/
-function form_rule_required(Form $form, $value, $element) {
- // The array test is for using the "required" rule on file elements
+function pieform_rule_required(Pieform $form, $value, $element) {
$function = 'form_is_empty_' . $element['type'];
if (function_exists($function)) {
if ($function($value, $element)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|