Skip to content

@RequestBody validation kotlin support improvement [SPR-17085] #21622

Closed

Description

@spring-projects-issues

Viacheslav Petriaiev opened SPR-17085 and commented

Hello, I have the next issue

javax.validation annotations (for example @NotEmpty) is not working properly with kotlin data class

Not working data class

data class User(@NotNull val login: String? = null)

Working data class

data class User(@field:NotNull val login: String? = null)

Thanks


Affects: 5.0.7

Issue Links:

Activity

  1. spring-projects-issues commented on Jul 25, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Sébastien Deleuze commented

    That's the expected behavior (even if surprising the first time) as described in the reference documentation.

  2. added
    status: invalid
    type: enhancement
    in: web
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webstatus: invalid

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions