选择语言 :

 Core_Valid::max_length

Checks that a field is short enough.

boolean Core_Valid::max_length( string $value , integer $length )

参数列表

参数 类型 描述 默认值
$value string Value
$length integer Maximum length required
返回值
  • boolean
File: ./core/classes/valid.class.php
public static function max_length($value, $length)
{
    return UTF8::strlen($value) <= $length;
}