Source for file Ethna_Plugin_Validator_Mbstrmax.php
Documentation is available at Ethna_Plugin_Validator_Mbstrmax.php
// vim: foldmethod=marker
* Ethna_Plugin_Validator_Mbstrmax.php
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
* @license http://www.opensource.org/licenses/bsd-license.php The BSD License
// {{{ Ethna_Plugin_Validator_Mbstrmax
* 最大値チェックプラグイン (マルチバイト文字列用)
* - mbstring を有効にしておく必要があります。
* - エラーメッセージは、全角半角を区別しません。
* @author Yoshinari Takaoka <takaoka@beatcraft.com>
/** @var bool 配列を受け取るかフラグ */
* @param string $name フォームの名前
* @param mixed $var フォームの値
* @param array $params プラグインのパラメータ
* @return true: 成功 Ethna_Error: エラー
function &validate($name, $var, $params)
if (isset
($params['mbstrmax']) ==
false ||
$this->isEmpty($var, $type)) {
$max_param =
$params['mbstrmax'];
if (isset
($params['error'])) {
$msg =
_et('Please input less than %d characters to {form}.');
Documentation generated on Fri, 11 Nov 2011 04:00:41 +0900 by phpDocumentor 1.4.3