Revision: 26
http://svn.sourceforge.net/pieforms/?rev=26&view=rev
Author: oracleshinoda
Date: 2006-11-18 04:26:16 -0800 (Sat, 18 Nov 2006)
Log Message:
-----------
Fixed the maxlength rule
Modified Paths:
--------------
pieforms/src/pieform/rules/maxlength.php
Modified: pieforms/src/pieform/rules/maxlength.php
===================================================================
--- pieforms/src/pieform/rules/maxlength.php 2006-11-18 12:21:55 UTC (rev 25)
+++ pieforms/src/pieform/rules/maxlength.php 2006-11-18 12:26:16 UTC (rev 26)
@@ -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,24 @@
* 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 given value is longer than the allowed length.
*
- * @param Form $form The form the rule is being applied to
- * @param string $value The value to check
- * @param array $element The element to check
- * @param int $maxlength The length to check for
- * @return string The error message, if the value is invalid.
+ * @param Pieform $form The form the rule is being applied to
+ * @param string $value The value to check
+ * @param array $element The element to check
+ * @param int $maxlength The length to check for
+ * @return string The error message, if the value is invalid.
*/
-function form_rule_maxlength(Form $form, $value, $element, $maxlength) {
+function pieform_rule_maxlength(Pieform $form, $value, $element, $maxlength) {
if (strlen($value) > $maxlength) {
return sprintf($form->i18n('maxlength'), $maxlength);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|