有很多字符串都是必填
'use strict';
// 在文件中定义一下
const requireString = RuleType.string().required();
const maxString = (length) => RuleType.string().max(length);
// 参数校验
export class UserDAO {
@Rule(requireString)
name: string;
@Rule(requireString)
name: string;
@Rule(requireString)
name: string;
@Rule(maxString(50))
info: string;
@Rule(maxString(200).required)
remark: string;
}