Browse Source

issue fixed

pull/1/head
Amrit Giri 4 years ago
parent
commit
bb03d8132d
  1. 8
      GME Remit/Modules/Login/User Interface/View/Login.storyboard
  2. 4
      GME Remit/Modules/Login/User Interface/View/LoginViewController.swift
  3. 4
      GME Remit/Modules/Profile/ChangePinAndPasswordViewController.swift
  4. 16
      GME Remit/Modules/Profile/ProfileChangePasswordViewController.swift
  5. 4
      GME Remit/Modules/Profile/ProfileChangePinViewController.swift
  6. 4
      GME Remit/Modules/RegisterModules/ExistingUserRegistration/UserRegistration/User Interface/View/UserRegistrationViewController.swift
  7. 4
      GME Remit/Modules/RegisterModules/NewUserRegister/User Interface/View/NewUserRegisterViewController.swift
  8. 1
      GME Remit/MultiLanguages/en.lproj/Localizable.strings
  9. 2
      GME Remit/Shared/PasswordInputViewController.swift

8
GME Remit/Modules/Login/User Interface/View/Login.storyboard

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@ -110,7 +110,7 @@ JME</string>
</userDefinedRuntimeAttributes>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Ej-jl-GYa">
<rect key="frame" x="230" y="3" width="40" height="44"/>
<rect key="frame" x="250" y="14" width="20" height="22"/>
<constraints>
<constraint firstAttribute="width" secondItem="8Ej-jl-GYa" secondAttribute="height" multiplier="10:11" id="Ruf-E3-f3t"/>
</constraints>
@ -226,6 +226,7 @@ JME</string>
<point key="canvasLocation" x="1516.875" y="232.3943661971831"/>
</scene>
</scenes>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<resources>
<image name="Show" width="20" height="14"/>
<image name="back_icon" width="23" height="17"/>
@ -242,5 +243,4 @@ JME</string>
<color red="0.5490196078431373" green="0.58823529411764708" blue="0.62745098039215685" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</document>

4
GME Remit/Modules/Login/User Interface/View/LoginViewController.swift

@ -10,6 +10,8 @@ import UIKit
import Localize_Swift
import LocalAuthentication
var passwordRegex = #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#
class LoginViewController: UIViewController {
struct StringConstants {
let headerTitle = "login_title_text".localized()
@ -145,7 +147,7 @@ class LoginViewController: UIViewController {
userNameTextField.validCondition = { !$0.isEmpty }
userNameTextField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged)
// passwordTextField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
// passwordTextField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
passwordTextField.errorMessage = "password_error_text".localized()
passwordTextField.isSecureTextEntry = true
passwordTextField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged)

4
GME Remit/Modules/Profile/ChangePinAndPasswordViewController.swift

@ -99,8 +99,8 @@ class ChangePinAndPasswordViewController: UIViewController {
confirmPinTextField.validCondition = {$0.count > 5}
currentPasswordTextField.validCondition = { !$0.isEmpty}
newPasswordTextField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
confirmPasswordTextField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
newPasswordTextField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
confirmPasswordTextField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
configureLanguage()
saveButton.layer.cornerRadius = 6

16
GME Remit/Modules/Profile/ProfileChangePasswordViewController.swift

@ -20,7 +20,7 @@ class ProfileChangePasswordViewController: UIViewController {
let passwordErrorText = "password_error_text".localized()
let saveText = "save_text".localized()
let titleText = "change_password_title_text".localized()
let titleText = "change_password_text".localized()
let successText = "success_text".localized()
let emptyPasswordError = "password_empty_error".localized()
let confirmPasswordError = "password_confirm_empty_error".localized()
@ -76,9 +76,9 @@ class ProfileChangePasswordViewController: UIViewController {
self.textFieldConfirmPassword.isSecureTextEntry = true
self.textFieldCurrentPassword.isSecureTextEntry = true
textFieldCurrentPassword.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
textFieldNewPassword.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
textFieldConfirmPassword.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
textFieldCurrentPassword.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
textFieldNewPassword.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
textFieldConfirmPassword.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
textFieldNewPassword.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged)
textFieldConfirmPassword.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged)
@ -167,11 +167,11 @@ extension ProfileChangePasswordViewController {
var error = ""
var isValid = true
if password.isEmpty {
if !password.validateRegex(regex: passwordRegex){
error = "\(error)\n\(StringConstants().emptyPasswordError)"
isValid = false
}
if confirmPassword.isEmpty {
if !confirmPassword.validateRegex(regex: passwordRegex){
error = "\(error)\n\(StringConstants().emptyPasswordError)"
isValid = false
}
@ -189,7 +189,7 @@ extension ProfileChangePasswordViewController {
var isValid = true
// user name
if currentPassword.isEmpty {
if !currentPassword.validateRegex(regex: passwordRegex){
error = "\(error)\n\(StringConstants().emptyPasswordError)"
isValid = false
}
@ -268,6 +268,6 @@ extension ProfileChangePasswordViewController {
default:
break
}
self.isValid = (encryptedOldPassword != "" && encryptedPassword != "" && encryptedConfirmPassword != "")
self.isValid = (encryptedOldPassword.validateRegex(regex: passwordRegex) && encryptedPassword.validateRegex(regex: passwordRegex) && encryptedConfirmPassword.validateRegex(regex: passwordRegex) )
}
}

4
GME Remit/Modules/Profile/ProfileChangePinViewController.swift

@ -183,11 +183,11 @@ extension ProfileChangePinViewController {
var error = ""
var isValid = true
if password.isEmpty && password.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#){
if password.isEmpty && password.validateRegex(regex: passwordRegex){
error = "\(error)\n\(StringConstants().emptyPasswordError)"
isValid = false
}
if confirmPassword.isEmpty && confirmPassword.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#){
if confirmPassword.isEmpty && confirmPassword.validateRegex(regex: passwordRegex){
error = "\(error)\n\(StringConstants().emptyPasswordError)"
isValid = false
}

4
GME Remit/Modules/RegisterModules/ExistingUserRegistration/UserRegistration/User Interface/View/UserRegistrationViewController.swift

@ -156,12 +156,12 @@ class UserRegistrationViewController: UIViewController {
newPasswordTxtField.titleText = StringConstants().passwordTitle
newPasswordTxtField.placeholder = StringConstants().passwordTitle
newPasswordTxtField.errorMessage = StringConstants().passwordError
newPasswordTxtField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
newPasswordTxtField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
confirmPassTxtField.titleText = StringConstants().confirmPasswordTitle
confirmPassTxtField.placeholder = StringConstants().confirmPasswordTitle
confirmPassTxtField.errorMessage = StringConstants().passwordError
confirmPassTxtField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
confirmPassTxtField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
newPinTxtField.titleText = StringConstants().newPinTitle
newPinTxtField.placeholder = StringConstants().newPinTitle

4
GME Remit/Modules/RegisterModules/NewUserRegister/User Interface/View/NewUserRegisterViewController.swift

@ -154,12 +154,12 @@ class NewUserRegisterViewController: UIViewController {
passwordTextField.titleText = StringConstants().passwordTitle
passwordTextField.placeholder = StringConstants().passwordPlaceholder
passwordTextField.errorMessage = StringConstants().passwordError
passwordTextField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
passwordTextField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
confirmPasswordTxtField.titleText = StringConstants().confirmPasswordTitle
confirmPasswordTxtField.placeholder = StringConstants().confirmPasswordPlaceholder
confirmPasswordTxtField.errorMessage = StringConstants().confirmPasswordError
confirmPasswordTxtField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
confirmPasswordTxtField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
referralCode.titleText = StringConstants().referralCode
referralCode.placeholder = StringConstants().referralCode

1
GME Remit/MultiLanguages/en.lproj/Localizable.strings

@ -229,7 +229,6 @@
"change_pin_password_title_text" = "Change PIN and Password";
"changepin_text" = "Change PIN";
"change_password_title_text" = "Change Password";
"current_password_text" = "Current Password";
"new_password_text" = "New Password";
"currentPin_text" = "Current Pin";

2
GME Remit/Shared/PasswordInputViewController.swift

@ -35,7 +35,7 @@ class PasswordInputViewController: UIViewController {
self.isValid = false
self.cancelBtn.isEnabled = true
passwordTextField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged)
passwordTextField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: #"^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,24}$"#)}
passwordTextField.validCondition = { !$0.isEmpty && $0.validateRegex(regex: passwordRegex)}
passwordTextField.isSecureTextEntry = true
titleLbl.text = "enter_login_password_text".localized()

Loading…
Cancel
Save