Skip to content

RuntimeException to ConstraintViolationList #4

Open

Description

@root-aza

Hi!
how do i get the array of errors and convert them to a structure ConstraintViolationList ?

Activity

  1. SerafimArts commented on Apr 28, 2025

    @SerafimArts
    Member

    All conversion errors occur in a single form (only one exception) . It is impossible to get a list of all errors.

    This is due to the fact that for the correct creation of any composite structure (for example, an object), it should be created completely correct, which guarantees that the incoming data will fully satisfy the requirements (it is impossible to create an object partially in order to continue analyzing its internal properties) and simplifies the implementation.

    Perhaps, to implement such functionality, it is possible to add a corresponding method, such as analysis, which will return a list of errors, but this will slow down the work... Or I can implement collecting a list of all errors only at one level (from one object), without nesting. I need to think about it...

  2. self-assigned this
    on Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions