Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter Constraint messages are not properly formatted #1100

Open
CamWrenn opened this issue Jul 9, 2024 · 1 comment
Open

Parameter Constraint messages are not properly formatted #1100

CamWrenn opened this issue Jul 9, 2024 · 1 comment
Labels
status/need-triage Team needs to triage and take a first look

Comments

@CamWrenn
Copy link

CamWrenn commented Jul 9, 2024

Hello. I'm working on a new spring shell project, and I cannot get parameter validation to display correctly.
Per docs, it should print the error like this:

The following constraints were not met:
	--password string : size must be between 8 and 40 (You passed 'hello')

But instead I get:

The following constraints were not met:
`ConstraintViolationImpl{interpolatedMessage='size must be between 8 and 40', propertyPath=changePassword.password, rootBeanClass=class com.example.test.commands.MyCommands, messageTemplate='{jakarta.validation.constraints.Size.message}'}`

ConstraintViolationImpl is from hibernate-validator:8.0.1.Final. It seems it doesn't have the nice toString method that ParameterValidationExceptionResultHandler expects?

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Jul 9, 2024
@libe
Copy link

libe commented Nov 22, 2024

Hello same issue here, there's any update on this? I reproduce this on 3.3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/need-triage Team needs to triage and take a first look
Projects
None yet
Development

No branches or pull requests

2 participants