proxmox-widget-toolkit/form
Stefan Reiter 15206214d9 ComboGrid: fix on-load validation for blank values
Commit f32aa3df74 fixed marking multi-select fields with where the store
did not contain a valid value after loading.

However, it introduced a bug for single-select fields where the value
(before the store-load) was explicitly set to be empty (when that should
be invalid because of allowBlank === false).

Fix the logic to correctly detect all scenarios (with def being the
value selected before the store loaded, i.e. undefined or an empty
array):

  !allowBlank &&
    ( def is an array but empty || def is not an array and falsy )

Also use correct error message (localized by ExtJS itself).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-01-30 16:14:03 +01:00
..
BondModeSelector.js node network: refactor bond mode array generation 2019-07-10 12:26:54 +02:00
Checkbox.js try to use real config properties 2017-03-29 18:47:19 +02:00
ComboGrid.js ComboGrid: fix on-load validation for blank values 2020-01-30 16:14:03 +01:00
DateTimeField.js DateTimeField.js - relay change events 2017-09-21 09:36:36 +02:00
IntegerField.js try to use real config properties 2017-03-29 18:47:19 +02:00
KVComboBox.js KVComboBox: add setComboItems function 2019-07-11 15:00:14 +02:00
LanguageSelector.js LanguageSelector.js - add language selector 2017-10-04 11:16:22 +02:00
NetworkSelector.js network selector: allow to select IP too 2019-06-27 21:51:02 +02:00
RRDTypeSelector.js add RRDTypeSelector class 2017-08-29 06:25:25 +02:00
TextField.js textfield: validate after allowBlank 2019-06-27 14:21:17 +02:00