42. Bean Validation Coding Step by Step - Part III - Implement Validation

Publié le: 05 octobre 2019
sur la chaîne: Miss Xing (邢老师)
2,076
74

Shows you how to implement bean validation with hibernate-validator version 6.
It has one mistake in the video about @DateTimeFormat. In the video, I said, @DateTimeFormatter cannot be used for LocalDate. I was wrong, it doesn't work in that case, is because the pattern string ("mm-DD-yyyy") I put is against the standard, it should be "MM-dd-yyyy"

What's in the video is
@DateTimeFormat(pattern = "mm-DD-yyyy")
private LocalDate birthday;

If you change to configuration below, it should work. Sorry for that.
@DateTimeFormat(pattern = "MM-dd-yyyy")
private LocalDate birthday;

Source code link: https://github.com/TinaXing2012/Spring
Project Name: SpringValidationXML


Sur cette page du site, vous pouvez voir la vidéo en ligne 42. Bean Validation Coding Step by Step - Part III - Implement Validation durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Miss Xing (邢老师) 05 octobre 2019, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2,076 fois et il a aimé 74 téléspectateurs. Bon visionnage!