required
required([strict=false])
作用
限制被检测值不为undefined | null
.
若开启严格模式(strict=true), 则被检测值不允许为undefiend | null | ''
。
参数
[strict]
(boolean) - 是否开启严格模式,默认为false
不开启。当明确设置strict=true
时,则开启严格模式。
示例
最后更新于
这有帮助吗?
required([strict=false])
限制被检测值不为undefined | null
.
若开启严格模式(strict=true), 则被检测值不允许为undefiend | null | ''
。
[strict]
(boolean) - 是否开启严格模式,默认为false
不开启。当明确设置strict=true
时,则开启严格模式。
最后更新于
这有帮助吗?