required
required([strict=false])
Effect
Restrict the detected string is not undefined | null
.
If strict mode is turned on(strict=true), the detected string can not be undefined | null | ''
.
Arguments
[strict]
(boolean) - Whether turn on strict mode, default isfalse
, means no-strict mode. You can exactly setstrict
totrue
to turn on strict mode.
Example
Last updated