[pve-devel] r5028 - pve-common/trunk
svn-commits at proxmox.com
svn-commits at proxmox.com
Tue Aug 17 16:01:38 CEST 2010
Author: dietmar
Date: 2010-08-17 14:01:38 +0000 (Tue, 17 Aug 2010)
New Revision: 5028
Modified:
pve-common/trunk/JSONSchema.pm
Log:
add true and false
Modified: pve-common/trunk/JSONSchema.pm
===================================================================
--- pve-common/trunk/JSONSchema.pm 2010-08-17 14:00:00 UTC (rev 5027)
+++ pve-common/trunk/JSONSchema.pm 2010-08-17 14:01:38 UTC (rev 5028)
@@ -143,9 +143,9 @@
if ($type eq 'string') {
return 1; # nothing to check ?
} elsif ($type eq 'boolean') {
- if ($value =~ m/^(1|yes|on)$/i) {
+ if ($value =~ m/^(1|true|yes|on)$/i) {
return 1;
- } elsif ($value =~ m/^(0|no|off)$/i) {
+ } elsif ($value =~ m/^(0|false|no|off)$/i) {
return 0;
} else {
add_error($errors, $path, "type check ('$type') failed - got '$value'");
More information about the pve-devel
mailing list