Skip to content

CDR default/multiline: Inconsistent error handling & looping in request properties #448

@dert0m

Description

@dert0m

Is this a regression?

Yes

Severity

🟡 Minor – small but noticeable issue

Please provide the branch(es) you discovered this issue in

v93

Environment Details

Chrome, Edge, Windows 11, v93 latest update

Please provide a minimal set of steps to reproduce the issue

  1. Define the following request properties:
Image

Validation script:

Dim iMinLength As Integer = 50
Dim strDescription As String = CStr(Value)
Dim iDescriptionLength = strDescription.Length

If Not String.IsNullOrEmpty(strDescription) Then
              If iDescriptionLength < iMinLength Then
                            Throw New ViException(#LD("The description must be at least {0} characters long. Current description length is {1}.", iMinLength, iDescriptionLength)#, ExceptionRelevance.EndUser)
              End If
End If
  1. Try to request the product and enter a description which is less then 50 characters
Image
  1. Enter again a description which is less than 50 character
Image
  1. The result is that the error message is displayed twice and the validation now runs in an endless loop, sending requests to the API server. The endless loop occurs because the value is reset to the value that was entered first. However, this value is also too short, so it is reset to the original value that was entered second, and so on.

Description

In general, there are two issues: the error message is displayed in a pop-up instead of as a mat-error, although it works correctly in v92 and v10. It is unclear why this behavior changed in v93, so this seems to be a bug. Additionally, resetting the value causes an infinite loop.

Describe what you expected to happen versus what actually happened

In v92 and v10, validation works as expected, with the error message shown as a Mat error instead of a pop-up. This is no longer the case in v93.

Relevant logs or console output

Add a screenshot(s) if that helps illustrate the problem

No response

Suggested Fix

To resolve this, the code from editor-base.ts, edit-default.component.html, and edit-multiline.component.html needs to be ported from v92 to v93.

Anything else?

No response

Before submitting...

  • I have searched for existing issues that match this one on github and on the community support page
  • I have included all necessary details to reproduce this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions