Solid Principles - Why & What ??

Поділитися
Вставка
  • Опубліковано 6 лис 2024

КОМЕНТАРІ • 3

  • @ayushjain7758
    @ayushjain7758 2 місяці тому

    This is international channel?

  • @NimmagaddaHarikiran
    @NimmagaddaHarikiran 2 місяці тому

    Hello, What if i put the @Valid and @validated above the method like in this way in the controller
    @Valid
    @Validated //No parameters are passed to both the valid and validated here
    public ResponseEntity addUser( @RequestBody User user){
    //some code
    }
    could you please explain this for me
    Also, I have one more question if i don't write the @Valid in the controller part which you shown in the video and hit the api still i'm able to get the error message for name as "name is mandatory" then what is the difference in keeping the @Valid and without @valid still it is throwing the error message

    • @crackITTechieTalks
      @crackITTechieTalks  2 місяці тому

      @Valid is for complete object validation and @Validated is for step level validation.