We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f0bfdf commit 1d40229Copy full SHA for 1d40229
src/validation/validators/boolean.validator.ts
@@ -9,6 +9,10 @@ export const BooleanValidator: BooleanValidator = {
9
validateAndParse: function(value) {
10
if (typeof value === 'boolean') {
11
return value;
12
+ } else if (/true/i.test(value)) {
13
+ return true;
14
+ } else if (/false/i.test(value)) {
15
+ return false;
16
} else {
17
throw new PropertyValidationError({ value, type: this.type });
18
}
0 commit comments