Hi,
(I thought I'd posted this but it doesn't seem to have stuck.)
I'm finding that the default messages are not displaying. I'm getting output like
TOO_SHORT:{minimumLength=6, maximumLength=32}
My code is pretty normal. I checked the source and I can see in MessageResolver.java this
public static final String DEFAULT_MESSAGE_PATH = "/messages.properties";
and the file is in the .jar package. This should be loaded with
new MessageResolver();
This is my codeMessageResolver resolver = new MessageResolver();
PasswordValidator validator = new PasswordValidator(resolver, ruleList);
PasswordData passwordData = new PasswordData(new Password(changePasswordForm.getPassword()));
RuleResult result = validator.validate(passwordData);
if (!result.isValid()) {
for (String message : validator.getMessages(result))
LOG.info("errors: " + message);
}
And my output is as above.
I've got the package loaded via maven calling in
<dependency>
<groupId>edu.vt.middleware</groupId>
<artifactId>vt-password</artifactId>
<version>3.1.2</version>
</dependency>
And although I'm using Spring, that "shouldn't" be affecting this.
Any ideas?
Thanks,
Jim