Commit c987131f by Nilu

S12516648 # Client - Incoming Issues (raised by Client) #Allow special characters in password

parent b086b07c
...@@ -14,7 +14,7 @@ public class PerformaPasswordValidator extends AttributeValidator ...@@ -14,7 +14,7 @@ public class PerformaPasswordValidator extends AttributeValidator
public boolean validate (Map attribMetadata, BaseBusinessClass obj, String fieldName, Object newValue) throws Exception public boolean validate (Map attribMetadata, BaseBusinessClass obj, String fieldName, Object newValue) throws Exception
{ {
String newPwd = (String) newValue; String newPwd = (String) newValue;
Pattern pattern = Pattern.compile("([a-zA-Z.@_]+\\d+[a-zA-Z0-9.@_]*)"); Pattern pattern = Pattern.compile("([a-zA-Z0-9.@_!#$%&*]*)");
Matcher matcher = pattern.matcher(newPwd); Matcher matcher = pattern.matcher(newPwd);
BusinessObjectParser.assertFieldCondition(matcher.matches(), obj, SecUser.FIELD_Password, "PasswordPatternNotMatched"); BusinessObjectParser.assertFieldCondition(matcher.matches(), obj, SecUser.FIELD_Password, "PasswordPatternNotMatched");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment