-
Type:
Problem report
-
Resolution: Fixed
-
Priority:
Trivial
-
Affects Version/s: 8.0.0beta2
-
Component/s: Frontend (F)
-
None
-
S26-W34/35
-
1
This fix is required to display inline validation errors correctly for ZBXNEXT-10353 and ZBXNEXT-10249. Current version doesn't have such case exactly because we either replace values to prevent invalid input (Graph forms) or field is not editable (Media and item test forms).
Steps to reproduce:
- Open media type test for Webhook type
- Inspect DOM and alter: parameters[0][name] value to empty string
- In DOM alter type from 4 to 5.
- Observe: there will be console error about missing field, but that is expected in this case
- Then change type back to 4.
Result:
We again have console error, but this time it is cause validated fields are collected incorrectly. Field to validate should be parameters/0/name. Console error: Validation error for missing field "/parameters/name": An array is expected.
Expected:
Changing type should collect validations correctly, that is parameters/*/name in case name field validation depends on type field.
Actual usage will be in following cases:
- Item edit form (Telemetry query): when changing Category or Metric points, user should see inline validation error in case Columns or Aggregated columns uses not supported configuration
- CEP edit form: when changing Time window, it affects for Operations what is allowed for Execute when, Operation and Property.