php正则表达式验证中文姓名 2-4个
  function realName($name)
    {
        return preg_match('/^[\x{4e00}-\x{9fa5}]{2,4}$/u', $name);
    }