Skip to main content


Showing posts from June, 2010

Spring MVC, Spring Bean Validation Framework and validating confirm password / confirm email fields.

How to write validation like confirm password, confirm email and etc in Spring MVC. NOTE: To make bean validation to work its nice to read this tutorial: <a href="" ></a> Today I was busy making some validations and implementations on very common scenario: change email and password. So we have a new password AND a new email also for both of them we have a confirm email/password field. And we want to validate everything nicely and to show to the user the real validation message if there is some error. So ... I've to use a form which already uses some annotations like @NoBlank and etc I think everyone of you is using annotations framework if you don't use it SHAME ON YOU !:) Anyway so I've added some fields to existing form bean: private String newPassword; private String confirmNewPassword; private String newEmail; private String confirmNewEmail; Bas