feat(isBoolean) Add loose option to isBoolean validator by brybrophy · Pull Request #1676 · validatorjs/validator.js
This PR adds a loose option to the isBoolean validator. It defaults to false, and in that mode, nothing changes from the current behavior.
When set to true, the validator will also validate yes, no, and will validate boolean strings of any case. (eg: ['true', 'True', 'TRUE', 'tRuE'])
This PR satisfies the request in this issue. #1672
Checklist
- PR contains only changes related; no stray files, etc.
- README updated (where applicable)
- Tests written (where applicable)