|
@ -28,35 +28,26 @@ public class ChangePasswordV2Presenter extends BasePresenter implements ChangePa |
|
|
boolean newPwdValidation=true; |
|
|
boolean newPwdValidation=true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (!Utils.hasSpecialCharacters(currentPass)) { |
|
|
|
|
|
// this.view.setCurrentPasswordError("Password must include at least one special character"); |
|
|
|
|
|
// currentPwdValidation= false; |
|
|
|
|
|
// } |
|
|
|
|
|
// if (!Utils.hasNumbers(currentPass)) { |
|
|
|
|
|
// this.view.setCurrentPasswordError("Password must include at least one number"); |
|
|
|
|
|
// currentPwdValidation= false; |
|
|
|
|
|
// } |
|
|
|
|
|
// if (currentPass.length()>1&¤tPass.length()<9) { |
|
|
|
|
|
// this.view.setCurrentPasswordError("Password should be greater than 8 character"); |
|
|
|
|
|
// currentPwdValidation= false; |
|
|
|
|
|
// } |
|
|
|
|
|
if(currentPass.trim().length()<1) |
|
|
if(currentPass.trim().length()<1) |
|
|
{ |
|
|
{ |
|
|
this.view.setCurrentPasswordError("Password cannot be empty"); |
|
|
this.view.setCurrentPasswordError("Password cannot be empty"); |
|
|
currentPwdValidation= false; |
|
|
currentPwdValidation= false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!Utils.hasSpecialCharacters(newPwd)) { |
|
|
if (!Utils.hasSpecialCharacters(newPwd)) { |
|
|
this.view.setNewPasswordError("Password must include at least one special character"); |
|
|
|
|
|
|
|
|
this.view.setNewPasswordError("Password should have at least one symbol"); |
|
|
newPwdValidation= false; |
|
|
newPwdValidation= false; |
|
|
} |
|
|
} |
|
|
if (!Utils.hasNumbers(newPwd)) { |
|
|
if (!Utils.hasNumbers(newPwd)) { |
|
|
this.view.setNewPasswordError("Password must include at least one number"); |
|
|
|
|
|
|
|
|
this.view.setNewPasswordError("Password should have at least one number"); |
|
|
newPwdValidation= false; |
|
|
newPwdValidation= false; |
|
|
} |
|
|
} |
|
|
if (newPwd.length()>1&&newPwd.length()<9) { |
|
|
if (newPwd.length()>1&&newPwd.length()<9) { |
|
|
this.view.setNewPasswordError("Password should be greater than 8 character"); |
|
|
|
|
|
|
|
|
this.view.setNewPasswordError("Password should have at least 9 characters"); |
|
|
|
|
|
newPwdValidation= false; |
|
|
|
|
|
} |
|
|
|
|
|
if (!Utils.hasAtleastOnCapitalLetter(newPwd)) { |
|
|
|
|
|
this.view.setNewPasswordError("Password should have at least one capital letter"); |
|
|
newPwdValidation= false; |
|
|
newPwdValidation= false; |
|
|
} |
|
|
} |
|
|
if(newPwd.trim().length()<1) |
|
|
if(newPwd.trim().length()<1) |
|
|