Skip to content

Commit

Permalink
Check on mail validation if it's not required
Browse files Browse the repository at this point in the history
  • Loading branch information
marina-waged committed Mar 23, 2020
1 parent 7538dac commit 9c57653
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ private boolean checkPattern(String originPattern) {
try {
Pattern patternObj = Pattern.compile(originPattern);
Matcher matcher = patternObj.matcher(extractData());
if (matcher.matches())

if(extractData().isEmpty() || matcher.matches())
return true;

} catch (Exception ex) {
Expand Down

0 comments on commit 9c57653

Please sign in to comment.