@ -48,6 +48,8 @@ public class UserFormDtoValidator implements Validator {
final String password = formDto.getPassword();
if (StringUtils.isEmpty(password)) {
errors.rejectValue("password", null, "Password is required");
} else if (password.length() < 10) {
errors.rejectValue("password", null, "Password length must be >= 10");
}
@ -31,9 +31,9 @@
<div class="col-sm-10">
<input type="password" th:name="password" class="form-control" placeholder="Type password"
required="required" th:field="*{password}"/>
required="required" th:field="*{password}" minlength="10"/>
<p class="help-block">Password, unique.</p>
<p class="help-block">Password, length >= 10 .</p>
</div>
<div class="form-group">