vt-middleware / passay

Password policy enforcement for Java.
http://www.passay.org
Other
281 stars 64 forks source link

Support internationalization of MatchBehavior. #141

Closed dfish3r closed 1 year ago

dfish3r commented 1 year ago

The MatchBehavior enum uses english language text by default. Add support for overriding that content in passay properties. In addition, allow the locale to be customized when formatting strings. Fixes #139.

dfish3r commented 1 year ago

Your comments jogged my memory and we're already doing something similar for some rules like AllowedCharacterRule. You can define a custom error message for any particular character by defining a property like ALLOWED_CHAR.32=No whitespace!

I pushed a commit that would support ALLOWED_CHAR.ENDS_WITH=Password cannot end with '%1$s'