vt-middleware / passay

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

Add StringMatch enum for string matching rules. #54

Closed dfish3r closed 7 years ago

dfish3r commented 7 years ago

Rules that implicitly used String#contains now use an enum so users can control matching for startsWith, endsWith, or contains. Added NumberRangeRule to provide a solution where regex is notoriously difficult.

dfish3r commented 7 years ago

Pushed javadocs changes and StringMatch rename.

dfish3r commented 7 years ago

I considered an AbstractMatchingCharacterRule, but the only thing it would contain is the MatchBehavior variable. I don't think any of the rule implementation could be abstracted away.

serac commented 7 years ago

Recent changes look good.