Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

Latest commit

 

History

History
28 lines (23 loc) · 656 Bytes

true-val.md

File metadata and controls

28 lines (23 loc) · 656 Bytes

True Val

Validates whether the value of input is true.

Valid values:

validator.trueVal().validate(true);
validator.trueVal().validate('true');
validator.trueVal().validate('yes');
validator.trueVal().validate('on');
validator.trueVal().validate(1);

Invalid values:

validator.trueVal().validate(false);
validator.trueVal().validate('false');
validator.trueVal().validate('no');
validator.trueVal().validate('off');
validator.trueVal().validate(0);
validator.trueVal().validate(null);
validator.trueVal().validate(undefined);
validator.trueVal().validate('foo');
validator.trueVal().validate([]);
validator.trueVal().validate({});