@livinglogic/livingapi 1.12.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livinglogic/livingapi",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Javascript version of the LivingAPI classes of LivingApps",
5
5
  "repository": {
6
6
  "type": "git",
package/src/livingapi.js CHANGED
@@ -1597,6 +1597,17 @@ export class BoolField extends Field
1597
1597
  if (this.control.required)
1598
1598
  change.errors.push(this.msg_field_required(change.value));
1599
1599
  }
1600
+ else if (typeof(change.value) === "string")
1601
+ {
1602
+ if (change.value.length === 0)
1603
+ {
1604
+ if (this.control.required)
1605
+ change.errors.push(this.msg_bool_truerequired(change.value));
1606
+ change.value = false
1607
+ }
1608
+ else
1609
+ change.value = true
1610
+ }
1600
1611
  else if (typeof(change.value) === "boolean")
1601
1612
  {
1602
1613
  if (this.control.required && !change.value)