Let us suppose to have a bean:
@Bean
PasswordEncoder getPasswordEncoder()
{
return new BCryptPasswordEncoder();
}
and on the html page:
<div class="form-group">
<label> Confirm Password</label>
<input type="password" class="form-control" th:field="*{confirmPassword}">
</div>
Is there any way to call BCryptPasswordEncoder().someFunction() on th:field before its value is send through submit?