required
required([strict=false])
Effect
Restrict the detect value is not undefined | null | NaN
.
If strict mode is turned on(strict=true), Restrict the detected value is not undefined | null | NaN | '' | {} | []
.
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