作者:mobiledu2502923083 | 来源:互联网 | 2023-09-09 09:17
| Q | A
| ------------------- | -----
| Bug report? | yes
| Feature request? | yes
| Swoft version | 2.0.6
| Swoole version | 4.4.7
| PHP version | 7.2.22
| Runtime environment | Docker etc.
Describe the bug
参数id为int类型,采用声明验证器,()一直提示声明message,换成()也是一样,字段参数都是不为null
参数:$uid,$touid,$p 都不为null,接口有传递参数
错误提示:参考图三,一直提示自定义的message信息,ValidateType也有引用,使用ValidateType::Body 和ValidateType::GET都是如下提示,无法通过类型验证
图4方式,提示错误: [ERROR] App\Exception\Handler\HttpExceptionHandler:handle(44) Argument 1 passed to Swoft\Validator\Helper\ValidatorHelper::validatelength() must be of the type string, integer given, called in /var/www/swoft/vendor/swoft/validator/src/Rule/LengthRule.php on line 38
Screenshots