Nice video. I was wondering if there is also something like the @DateTimeFormat annotation that Spring has, without having to write a custom validator for this. If I now enter a wrong date format that cannot be parsed into a LocalDate, Quarkus returns a 404 NotFound, whereas I would expect a 400 BadRequest.
Nice way to customize validators! Even I feeling lack of the power from Spring Annotations to make it more easier and less verbose, than implementing a "custom annotation" and a "custom processor" to handle "fixed field names" (field names could be sent through annotation parameter maybe?)
Thanks for the feedback. Yes, indeed spring is well known by having much less verbose abstractions. In the other hand, it uses JavaX Validation API as default validation tool. Using field validations the validator receives the actual field value, but in this example I needed to use it on class level in order to have a composite validation (social security number and issued state).
Hi - I am getting error while defining validatorContext as - Cannot use 'var' on variable without initializer -HibernateConstraintValidatorContext cannot be resolved to a variable Syntax error on token ":", ; expected Can you please let me know what should be the fix
Hey there! The first problem it comes to my mind is your JDK. In order to use the `var` keyword you need to be running JDK 10 or above. Could you review that? Feel free to keep the conversation going here if that doesn't solve your issue. Thank you for watching for the feedback.