0

I have a Spring Boot/Webflux project and would like to set a validation error if a username already exists, with a friendly message. However, if I make a non-blocking call to the database in the validate(Object target, Errors errors) method then it's not clear what to do with the returned Mono. The only workaround I found was to use the non-reactive database driver to check for existence, which at least doesn't require calling block() directly. Any other suggestions?

2
  • can you provide code samples, your question is not clear ! Commented Aug 21, 2022 at 13:49
  • I guess I'm just looking for a Reactive version of Spring's org.springframework.validation.Validator interface Commented Sep 12, 2022 at 16:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.