BoolVal
BoolVal()
Boolean values for this rule are [0, 1, True, False, '0', '1', 'yes', 'no', 'on', 'off', 'true', 'false']
(all string values compare as lowercase).
Validates if the input results in a boolean value:
v.boolVal().validate('on') # true
v.boolVal().validate('off') # true
v.boolVal().validate('yes') # true
v.boolVal().validate('no') # true
v.boolVal().validate(1) # true
v.boolVal().validate(0) # true
Categorization
- Booleans
- Types
Changelog
Version | Description |
---|---|
1.0.0 | Created |
See also: