@@Javatechie sorry may be not understood.. I'm asking one to many relationships using validator. Many relationships not working validation. Can you try once
You can, but will you add this every time you need to perform this validation ? If in future you need to add 1 more value to the pattern, you will have to change this pattern in every single place you have used this.
Hi Sir we have Employee class in dto we are using @notnull and @not empty ...it's working fine for all fields ...but my scenario is suppose if the user send pay load to controller based on user dept type I want to check only first and last name and for second user i dont need to check names but I need to check only email and password....is it possible here to validate like that or we need to write logics separately ? In this case always it will check the values for entire Employee class Can u plz advise ...thanks for the video
@@samirpanda1147 there’s a way to validate using code, and annotation. I forgot what it’s called but basically you get access to the fields using this validator so you can check for nulls or do whatever you need to do. Let me see if I can find out the proper term.
Thank you so much for creating such great real world example. Very very helpful for me. I just want to request you that if you can create a video on how we can find performance issues in our application? That would be great help. I will appreciate it. Thanks again. 😊😊😊
Very nice demonstration about custom annotation. One question: The message has hard coded values for the employeeType. Later if we add new types in an enum then can we have the message dynamic so that it fetches the valid values from the enum itself?
Instead of writing so much code to validate employee type, just create an Enum for Employee type with the required value and take reference of that Enum in employee request DTO
can you make one more video on how to use group() and payload() method by example ,it would be great help ,i searched on internet but hard time to understanding proper usecases ,if anybody knows let me know.
Hi Thanks 🙏👍 Can u make a video on following list 1. How to validate a list or a map of objects 2. How to pass a validated list of allowed strings during entity creation itself.
Sir if it is possible, please upload one video for response validation also. In my current project I am dealing with lot of third party apis response and I need to validate them. It will be great help if you upload one video.
Please explain how to handle request reject exception.I need to handle //(doubleslashes) in url when calling the api. I don't find any solution for this please explain.
Is the any way to to disable scripts (java script ) requesting to server or disable json (use xml configuration instead) , similarly disable JS files in rendering to client . I am assuming environment is springboot application with pure java
hello teacher, i am new to spring validation and i have encountered a problem that one of my data fields has type double and now i want to check when i enter a string or a character it will give an error format, but I have tried many times and failed, can you help me?
@@Javatechie i got a list of json request from client and if i have a controller for handling list of (suppose employee) object but my validation is for bean . when i validate it does not give the expected output . the response i am getting is also in the list of object. THE Approach you told does not work i have tried .
Great video, just one question. Is the Javax bean validation and Jakarta bean validation same dependencies? The annotation is working with javax but not with jakarta. I checked maven repository and there it was mentioned that "Note Javax artifact was moved to Jakarta.validation ".