Cong Liu
Cong Liu
@midwayjs/logger上也提交了相同的issue (midwayjs/logger#62)
> 日志里要打 % 格式的内容? 是的
@czy88840616 你们会修复吗,我提交了PR (midwayjs/logger#63)
这种例子有很多,比如 * DB Connection可以是host, port的对象,也可以是一个uri连接字符串,或者sqlite那种包含database文件名的 * 用户设备可以是UserAgent格式的字符串,或者包含device, platform, version的对象 * 一本书可以是一个ISBN号码,或者包含国家、出版社、版本、年份、名称、作者的对象
对于问题1,我现在有个办法就是给Human增加一个`type`字段声明类别,然后用`joi.when`判断类型,用`getClassMetadata(RULES_KEY, SubClass)`来获取验证规则,以及用class-transformer的`discriminator`来转换成实际的子类对象。 ```typescript class HumanDTO { @Rule(RuleType.when('human.type', { switch: [ { is: 'by-age', then: RuleType.object(getClassMetadata(RULES_KEY, HumanByAge).meta({ id: HumanByAge.name }) }, { is: 'by-location', then: RuleType.object(getClassMetadata(RULES_KEY, HumanByLocation).meta({ id: HumanByLocation.name }) }...
> 如果是子类,我理解就是面向不同 DTO 的单独校验了,直接在装饰器上做并不是适合了,还是要靠 validateService 的 API 来单独校验了。 我觉得Joi已经提供了类似的验证机制,能不能跟class-transformer再整合一下,让DTO的验证更方便一些呢
It's supported via passing `--enable-logging=stderr` CLI argument. Then you will see all console and NW logs like Linux and Mac.
@MichalMisiaszek Do you have a sample app to reproduce this issue?
Input could have two labels on both left and right side. So two slots are required.
> > See https://developer.qiniu.com/kodo/manual/1206/put-policy#forcesaveKey > > 你好,这个是在哪个版本更新的,看7.3.1版本里面的代码,forceSaveKey并没有增加进去。 不知道哪个版本更新的,只是看到官方文档里写了