Browse Source

validation added

pull/1/head
gme_2 6 years ago
parent
commit
826f760176
  1. 29
      GMERemittance/Module/New Group/kycForm1/Application Logic/Interactor/kycForm1Interactor.swift
  2. 4
      GMERemittance/Module/New Group/kycForm1/Application Logic/Interactor/kycForm1InteractorIO.swift
  3. 1
      GMERemittance/Module/New Group/kycForm1/Application Logic/Service/kycForm1ServiceType.swift
  4. 2
      GMERemittance/Module/New Group/kycForm1/Module Interface/kycForm1ModuleInterface.swift
  5. 8
      GMERemittance/Module/New Group/kycForm1/User Interface/Presenter/kycForm1Presenter.swift
  6. 106
      GMERemittance/Module/New Group/kycForm1/User Interface/View/kycForm1.storyboard
  7. 194
      GMERemittance/Module/New Group/kycForm1/User Interface/View/kycForm1ViewController.swift
  8. 1
      GMERemittance/Module/New Group/kycForm1/User Interface/View/kycForm1ViewInterface.swift

29
GMERemittance/Module/New Group/kycForm1/Application Logic/Interactor/kycForm1Interactor.swift

@ -21,11 +21,40 @@ class KycForm1Interactor {
self.service = service self.service = service
} }
func _validate(model: kycForm1Model) -> ([String: String]) {
var errorDick: [String: String] = [:]
let formDick =
[
KycForm1FieldKeys.firstName: model.firstName,
KycForm1FieldKeys.lastName: model.lastName,
KycForm1FieldKeys.middleName: model.middleName,
KycForm1FieldKeys.gender: model.gender,
KycForm1FieldKeys.email: model.email,
KycForm1FieldKeys.dob: model.dob,
KycForm1FieldKeys.nativeCountry: model.nativeCountry,
KycForm1FieldKeys.country: model.country,
KycForm1FieldKeys.occupation: model.occupation,
KycForm1FieldKeys.province: model.province,
KycForm1FieldKeys.mobileNumber: model.mobile
]
formDick.forEach({
if $0.value.isEmpty {
errorDick[$0.key] = "required"
}
})
return errorDick
}
// MARK: Converting entities // MARK: Converting entities
} }
// MARK: KycForm1 interactor input interface // MARK: KycForm1 interactor input interface
extension KycForm1Interactor: KycForm1InteractorInput { extension KycForm1Interactor: KycForm1InteractorInput {
func validate(model: kycForm1Model) {
let result = self._validate(model: model)
self.output?.show(errors: result)
}
} }

4
GMERemittance/Module/New Group/kycForm1/Application Logic/Interactor/kycForm1InteractorIO.swift

@ -7,9 +7,9 @@
// //
protocol KycForm1InteractorInput: class { protocol KycForm1InteractorInput: class {
func validate(model: kycForm1Model)
} }
protocol KycForm1InteractorOutput: class { protocol KycForm1InteractorOutput: class {
func show(errors: [String: String])
} }

1
GMERemittance/Module/New Group/kycForm1/Application Logic/Service/kycForm1ServiceType.swift

@ -11,3 +11,4 @@ import Foundation
protocol KycForm1ServiceType: class { protocol KycForm1ServiceType: class {
} }

2
GMERemittance/Module/New Group/kycForm1/Module Interface/kycForm1ModuleInterface.swift

@ -7,5 +7,5 @@
// //
protocol KycForm1ModuleInterface: class { protocol KycForm1ModuleInterface: class {
func validate(model: kycForm1Model)
} }

8
GMERemittance/Module/New Group/kycForm1/User Interface/Presenter/kycForm1Presenter.swift

@ -22,11 +22,15 @@ class KycForm1Presenter {
// MARK: KycForm1 module interface // MARK: KycForm1 module interface
extension KycForm1Presenter: KycForm1ModuleInterface { extension KycForm1Presenter: KycForm1ModuleInterface {
func validate(model: kycForm1Model) {
self.interactor?.validate(model: model)
}
} }
// MARK: KycForm1 interactor output interface // MARK: KycForm1 interactor output interface
extension KycForm1Presenter: KycForm1InteractorOutput { extension KycForm1Presenter: KycForm1InteractorOutput {
func show(errors: [String : String]) {
self.view?.show(errors: errors)
}
} }

106
GMERemittance/Module/New Group/kycForm1/User Interface/View/kycForm1.storyboard

@ -26,29 +26,29 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="1300"/> <rect key="frame" x="0.0" y="0.0" width="375" height="1300"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ixK-Bl-e32">
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ixK-Bl-e32">
<rect key="frame" x="0.0" y="0.0" width="375" height="1300"/> <rect key="frame" x="0.0" y="0.0" width="375" height="1300"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ulz-yj-JUf"> <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ulz-yj-JUf">
<rect key="frame" x="0.0" y="0.0" width="375" height="1075"/> <rect key="frame" x="0.0" y="0.0" width="375" height="1075"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cx7-yC-Iyy"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cx7-yC-Iyy">
<rect key="frame" x="0.0" y="0.0" width="5" height="1075"/>
<rect key="frame" x="0.0" y="0.0" width="15" height="1075"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="5" id="Loe-0S-vzZ"/>
<constraint firstAttribute="width" constant="15" id="Loe-0S-vzZ"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="5Yj-58-A1e"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="5Yj-58-A1e">
<rect key="frame" x="5" y="0.0" width="365" height="1075"/>
<rect key="frame" x="15" y="0.0" width="345" height="1075"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="fHx-i6-TAt"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="fHx-i6-TAt">
<rect key="frame" x="0.0" y="0.0" width="365" height="50"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="50"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Tell us a few things about yourself" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5gp-EN-amE"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Tell us a few things about yourself" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5gp-EN-amE">
<rect key="frame" x="0.0" y="0.0" width="365" height="50"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="50"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="50" id="VW7-6s-ifB"/> <constraint firstAttribute="height" constant="50" id="VW7-6s-ifB"/>
@ -60,13 +60,13 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="QtF-v5-ULz"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="QtF-v5-ULz">
<rect key="frame" x="0.0" y="70" width="365" height="1005"/>
<rect key="frame" x="0.0" y="70" width="345" height="1005"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="MuX-Si-40N"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="MuX-Si-40N">
<rect key="frame" x="0.0" y="0.0" width="365" height="82"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="82"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="First Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VWL-1e-dX6"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="First Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VWL-1e-dX6">
<rect key="frame" x="0.0" y="0.0" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="6OC-Dh-iss"/> <constraint firstAttribute="height" constant="15" id="6OC-Dh-iss"/>
</constraints> </constraints>
@ -75,7 +75,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Gb-uL-YsM"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Gb-uL-YsM">
<rect key="frame" x="0.0" y="19.5" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="19.5" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="ovN-KL-w3Z"/> <constraint firstAttribute="height" constant="15" id="ovN-KL-w3Z"/>
</constraints> </constraints>
@ -84,7 +84,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your First Name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="wBc-TT-A5d"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your First Name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="wBc-TT-A5d">
<rect key="frame" x="0.0" y="39" width="365" height="43"/>
<rect key="frame" x="0.0" y="39" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="Psk-Sn-kig"/> <constraint firstAttribute="height" constant="43" id="Psk-Sn-kig"/>
</constraints> </constraints>
@ -95,10 +95,10 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="8pV-0F-5Pb"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="8pV-0F-5Pb">
<rect key="frame" x="0.0" y="92" width="365" height="82"/>
<rect key="frame" x="0.0" y="92" width="345" height="82"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Middle Name (Optional)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vgx-6G-7I7"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Middle Name (Optional)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vgx-6G-7I7">
<rect key="frame" x="0.0" y="0.0" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="lxD-eo-pUc"/> <constraint firstAttribute="height" constant="15" id="lxD-eo-pUc"/>
</constraints> </constraints>
@ -107,7 +107,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tJl-Dj-BpS"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tJl-Dj-BpS">
<rect key="frame" x="0.0" y="19.5" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="19.5" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="LlD-xX-q8N"/> <constraint firstAttribute="height" constant="15" id="LlD-xX-q8N"/>
</constraints> </constraints>
@ -116,7 +116,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your Middle Name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Kfc-8L-wAi"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your Middle Name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Kfc-8L-wAi">
<rect key="frame" x="0.0" y="39" width="365" height="43"/>
<rect key="frame" x="0.0" y="39" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="RYj-gp-Lp4"/> <constraint firstAttribute="height" constant="43" id="RYj-gp-Lp4"/>
</constraints> </constraints>
@ -127,10 +127,10 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="mME-2B-4tJ"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="mME-2B-4tJ">
<rect key="frame" x="0.0" y="184" width="365" height="82"/>
<rect key="frame" x="0.0" y="184" width="345" height="82"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Last Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9oM-HO-xMi"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Last Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9oM-HO-xMi">
<rect key="frame" x="0.0" y="0.0" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="L2N-Uf-6wp"/> <constraint firstAttribute="height" constant="15" id="L2N-Uf-6wp"/>
</constraints> </constraints>
@ -139,7 +139,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wnv-wb-C2S"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wnv-wb-C2S">
<rect key="frame" x="0.0" y="19.5" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="19.5" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="jpo-Mq-7IK"/> <constraint firstAttribute="height" constant="15" id="jpo-Mq-7IK"/>
</constraints> </constraints>
@ -148,7 +148,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your Last Name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="0xU-qC-J9J"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your Last Name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="0xU-qC-J9J">
<rect key="frame" x="0.0" y="39" width="365" height="43"/>
<rect key="frame" x="0.0" y="39" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="pEo-O4-Ztm"/> <constraint firstAttribute="height" constant="43" id="pEo-O4-Ztm"/>
</constraints> </constraints>
@ -159,10 +159,10 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="9IE-gI-ZYn"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="9IE-gI-ZYn">
<rect key="frame" x="0.0" y="276" width="365" height="82"/>
<rect key="frame" x="0.0" y="276" width="345" height="82"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Gender" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bPf-Nl-7DP"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Gender" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bPf-Nl-7DP">
<rect key="frame" x="0.0" y="0.0" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="LVT-Dt-8ig"/> <constraint firstAttribute="height" constant="15" id="LVT-Dt-8ig"/>
</constraints> </constraints>
@ -171,7 +171,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uRv-YS-eaE"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uRv-YS-eaE">
<rect key="frame" x="0.0" y="19.5" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="19.5" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="nNe-dj-m2s"/> <constraint firstAttribute="height" constant="15" id="nNe-dj-m2s"/>
</constraints> </constraints>
@ -180,7 +180,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Select your Gender" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="jMe-PA-j1d"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Select your Gender" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="jMe-PA-j1d">
<rect key="frame" x="0.0" y="39" width="365" height="43"/>
<rect key="frame" x="0.0" y="39" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="D6D-UY-i1q"/> <constraint firstAttribute="height" constant="43" id="D6D-UY-i1q"/>
</constraints> </constraints>
@ -191,10 +191,10 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="tlY-ip-g4p"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="tlY-ip-g4p">
<rect key="frame" x="0.0" y="368" width="365" height="82"/>
<rect key="frame" x="0.0" y="368" width="345" height="82"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date of Birth" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="exz-v7-Ii8"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date of Birth" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="exz-v7-Ii8">
<rect key="frame" x="0.0" y="0.0" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="KCx-Ju-n29"/> <constraint firstAttribute="height" constant="15" id="KCx-Ju-n29"/>
</constraints> </constraints>
@ -203,7 +203,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="If1-lU-OXh"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="If1-lU-OXh">
<rect key="frame" x="0.0" y="19.5" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="19.5" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="VBn-1n-XzJ"/> <constraint firstAttribute="height" constant="15" id="VBn-1n-XzJ"/>
</constraints> </constraints>
@ -212,7 +212,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Select your Date of Birth" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="hEk-Wb-CTe"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Select your Date of Birth" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="hEk-Wb-CTe">
<rect key="frame" x="0.0" y="39" width="365" height="43"/>
<rect key="frame" x="0.0" y="39" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="uoy-YP-GxH"/> <constraint firstAttribute="height" constant="43" id="uoy-YP-GxH"/>
</constraints> </constraints>
@ -223,10 +223,10 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="ZS4-HL-Kzg"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="ZS4-HL-Kzg">
<rect key="frame" x="0.0" y="460" width="365" height="82"/>
<rect key="frame" x="0.0" y="460" width="345" height="82"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mobile No." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pOi-J4-HpV"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mobile No." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pOi-J4-HpV">
<rect key="frame" x="0.0" y="0.0" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="BCk-7Y-WZg"/> <constraint firstAttribute="height" constant="15" id="BCk-7Y-WZg"/>
</constraints> </constraints>
@ -235,7 +235,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kdz-bY-Yvt"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kdz-bY-Yvt">
<rect key="frame" x="0.0" y="19.5" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="19.5" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="X0i-4E-NYr"/> <constraint firstAttribute="height" constant="15" id="X0i-4E-NYr"/>
</constraints> </constraints>
@ -244,7 +244,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your Mobile No." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="e0l-hm-b9a"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your Mobile No." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="e0l-hm-b9a">
<rect key="frame" x="0.0" y="39" width="365" height="43"/>
<rect key="frame" x="0.0" y="39" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="FKX-uz-7VM"/> <constraint firstAttribute="height" constant="43" id="FKX-uz-7VM"/>
</constraints> </constraints>
@ -255,10 +255,10 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="aBI-2t-Tak"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="aBI-2t-Tak">
<rect key="frame" x="0.0" y="552" width="365" height="82"/>
<rect key="frame" x="0.0" y="552" width="345" height="82"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Email Address" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lrG-sR-08m"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Email Address" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lrG-sR-08m">
<rect key="frame" x="0.0" y="0.0" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="Ycw-LA-W4t"/> <constraint firstAttribute="height" constant="15" id="Ycw-LA-W4t"/>
</constraints> </constraints>
@ -267,7 +267,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IuA-we-6Ky"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IuA-we-6Ky">
<rect key="frame" x="0.0" y="19.5" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="19.5" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="XoJ-cj-4NW"/> <constraint firstAttribute="height" constant="15" id="XoJ-cj-4NW"/>
</constraints> </constraints>
@ -276,7 +276,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your Email Address" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="P4e-l6-JXm"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your Email Address" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="P4e-l6-JXm">
<rect key="frame" x="0.0" y="39" width="365" height="43"/>
<rect key="frame" x="0.0" y="39" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="5AH-hp-Nq2"/> <constraint firstAttribute="height" constant="43" id="5AH-hp-Nq2"/>
</constraints> </constraints>
@ -287,10 +287,10 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Oi0-Od-8ks"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Oi0-Od-8ks">
<rect key="frame" x="0.0" y="644" width="365" height="83"/>
<rect key="frame" x="0.0" y="644" width="345" height="83"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Native Country" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UGo-bk-Rq9"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Native Country" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UGo-bk-Rq9">
<rect key="frame" x="0.0" y="0.0" width="365" height="15"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="QIa-3d-pRK"/> <constraint firstAttribute="height" constant="15" id="QIa-3d-pRK"/>
</constraints> </constraints>
@ -299,7 +299,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AKa-mq-dNv"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AKa-mq-dNv">
<rect key="frame" x="0.0" y="20" width="365" height="15"/>
<rect key="frame" x="0.0" y="20" width="345" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="3zm-7X-fa9"/> <constraint firstAttribute="height" constant="15" id="3zm-7X-fa9"/>
</constraints> </constraints>
@ -308,7 +308,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your Native Country" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="cXS-dQ-HBb"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your Native Country" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="cXS-dQ-HBb">
<rect key="frame" x="0.0" y="40" width="365" height="43"/>
<rect key="frame" x="0.0" y="40" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="RLd-eK-qY4"/> <constraint firstAttribute="height" constant="43" id="RLd-eK-qY4"/>
</constraints> </constraints>
@ -319,10 +319,10 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="VKC-oG-zQf"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="VKC-oG-zQf">
<rect key="frame" x="0.0" y="737" width="365" height="83"/>
<rect key="frame" x="0.0" y="737" width="345" height="83"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Country" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qfd-4I-OvP"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Country" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qfd-4I-OvP">
<rect key="frame" x="0.0" y="0.0" width="365" height="15"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="tjn-mF-Qhk"/> <constraint firstAttribute="height" constant="15" id="tjn-mF-Qhk"/>
</constraints> </constraints>
@ -331,7 +331,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yZy-Av-oFf"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yZy-Av-oFf">
<rect key="frame" x="0.0" y="20" width="365" height="15"/>
<rect key="frame" x="0.0" y="20" width="345" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="6Om-Sq-rAH"/> <constraint firstAttribute="height" constant="15" id="6Om-Sq-rAH"/>
</constraints> </constraints>
@ -340,7 +340,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Select your Country" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bRp-8B-RFU"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Select your Country" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bRp-8B-RFU">
<rect key="frame" x="0.0" y="40" width="365" height="43"/>
<rect key="frame" x="0.0" y="40" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="46e-Ms-7Qp"/> <constraint firstAttribute="height" constant="43" id="46e-Ms-7Qp"/>
</constraints> </constraints>
@ -351,10 +351,10 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="dAp-gm-h7D"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="dAp-gm-h7D">
<rect key="frame" x="0.0" y="830" width="365" height="83"/>
<rect key="frame" x="0.0" y="830" width="345" height="83"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Province" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="d1k-Xs-axj"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Province" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="d1k-Xs-axj">
<rect key="frame" x="0.0" y="0.0" width="365" height="15"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="G4J-3v-dog"/> <constraint firstAttribute="height" constant="15" id="G4J-3v-dog"/>
</constraints> </constraints>
@ -363,7 +363,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rqL-H3-Mlf"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rqL-H3-Mlf">
<rect key="frame" x="0.0" y="20" width="365" height="15"/>
<rect key="frame" x="0.0" y="20" width="345" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="d6g-YR-qwt"/> <constraint firstAttribute="height" constant="15" id="d6g-YR-qwt"/>
</constraints> </constraints>
@ -372,7 +372,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your City" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="SC9-rY-28Z"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter your City" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="SC9-rY-28Z">
<rect key="frame" x="0.0" y="40" width="365" height="43"/>
<rect key="frame" x="0.0" y="40" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="9qq-cT-a0a"/> <constraint firstAttribute="height" constant="43" id="9qq-cT-a0a"/>
</constraints> </constraints>
@ -383,10 +383,10 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="T5L-LD-asN"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="T5L-LD-asN">
<rect key="frame" x="0.0" y="923" width="365" height="82"/>
<rect key="frame" x="0.0" y="923" width="345" height="82"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Occupation" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aYD-8r-p9B"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Occupation" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aYD-8r-p9B">
<rect key="frame" x="0.0" y="0.0" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="0.0" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="Gqq-Jg-lRN"/> <constraint firstAttribute="height" constant="15" id="Gqq-Jg-lRN"/>
</constraints> </constraints>
@ -395,7 +395,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AeT-CH-RYG"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="error" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AeT-CH-RYG">
<rect key="frame" x="0.0" y="19.5" width="365" height="14.5"/>
<rect key="frame" x="0.0" y="19.5" width="345" height="14.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="W55-vH-e9C"/> <constraint firstAttribute="height" constant="15" id="W55-vH-e9C"/>
</constraints> </constraints>
@ -404,7 +404,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Select your Occupation" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ayn-DP-9bq"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Select your Occupation" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ayn-DP-9bq">
<rect key="frame" x="0.0" y="39" width="365" height="43"/>
<rect key="frame" x="0.0" y="39" width="345" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="iMv-oN-EWg"/> <constraint firstAttribute="height" constant="43" id="iMv-oN-EWg"/>
</constraints> </constraints>
@ -420,7 +420,7 @@
</subviews> </subviews>
</stackView> </stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cn4-Hf-O4w"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cn4-Hf-O4w">
<rect key="frame" x="370" y="0.0" width="5" height="1075"/>
<rect key="frame" x="360" y="0.0" width="15" height="1075"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
@ -453,7 +453,7 @@
</subviews> </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="bottom" secondItem="4QD-n7-cbc" secondAttribute="bottom" id="Erm-Mb-Eef"/>
<constraint firstAttribute="bottom" secondItem="4QD-n7-cbc" secondAttribute="bottom" constant="50" id="Erm-Mb-Eef"/>
<constraint firstItem="4QD-n7-cbc" firstAttribute="top" secondItem="Ulz-yj-JUf" secondAttribute="bottom" constant="50" id="GBy-wV-Yc7"/> <constraint firstItem="4QD-n7-cbc" firstAttribute="top" secondItem="Ulz-yj-JUf" secondAttribute="bottom" constant="50" id="GBy-wV-Yc7"/>
<constraint firstItem="Ulz-yj-JUf" firstAttribute="leading" secondItem="ixK-Bl-e32" secondAttribute="leading" id="Ii3-fB-cp1"/> <constraint firstItem="Ulz-yj-JUf" firstAttribute="leading" secondItem="ixK-Bl-e32" secondAttribute="leading" id="Ii3-fB-cp1"/>
<constraint firstItem="4QD-n7-cbc" firstAttribute="centerX" secondItem="ixK-Bl-e32" secondAttribute="centerX" id="Jam-s2-S0E"/> <constraint firstItem="4QD-n7-cbc" firstAttribute="centerX" secondItem="ixK-Bl-e32" secondAttribute="centerX" id="Jam-s2-S0E"/>

194
GMERemittance/Module/New Group/kycForm1/User Interface/View/kycForm1ViewController.swift

@ -9,25 +9,42 @@
import UIKit import UIKit
import XLPagerTabStrip import XLPagerTabStrip
class kycForm1Model {
var firstName = ""
var middleName = ""
var lastName = ""
var gender = ""
var dob = ""
var mobile = ""
var email = ""
var nativeCountry = ""
var country = ""
var province = ""
var occupation = ""
}
struct KycForm1FieldKeys {
static let firstName = "firstName"
static let middleName = "middleName"
static let lastName = "lastName"
static let gender = "gender"
static let dob = "dob"
static let mobileNumber = "mobileNumber"
static let email = "email"
static let nativeCountry = "nativeCountry"
static let country = "country"
static let province = "province"
static let occupation = "occupation"
}
class KycForm1ViewController: UIViewController { class KycForm1ViewController: UIViewController {
struct Constants { struct Constants {
static let segmentBackgroundViewColor = UIColor.init(hex: "E7EDF2") static let segmentBackgroundViewColor = UIColor.init(hex: "E7EDF2")
static let stateRedColor = UIColor.init(hex: "#EC1C24")
} }
struct FieldKeys {
static let firstName = "firstName"
static let middleName = "middleName"
static let lastName = "lastName"
static let gender = "gender"
static let dob = "dob"
static let mobileNumber = "mobileNumber"
static let email = "email"
static let nativeCountry = "nativeCountry"
static let country = "country"
static let province = "province"
static let occupation = "occupation"
}
// MARK: IBOutlets // MARK: IBOutlets
// validation labels // validation labels
@ -57,15 +74,17 @@ class KycForm1ViewController: UIViewController {
@IBOutlet weak var occupationTextField: UITextField! @IBOutlet weak var occupationTextField: UITextField!
// MARK: Properties // MARK: Properties
var presenter: KycForm1ModuleInterface? var presenter: KycForm1ModuleInterface?
var kycModel: kycForm1Model = kycForm1Model()
var errorTextFieldDict: [String: UITextField] = [:] var errorTextFieldDict: [String: UITextField] = [:]
var errorLabelsDict: [String: UILabel] = [:] var errorLabelsDict: [String: UILabel] = [:]
var errorLabels: [UILabel] = []
var textfields: [UITextField] = []
// MARK: VC's Life cycle // MARK: VC's Life cycle
override func viewDidLoad() { override func viewDidLoad() {
@ -76,7 +95,18 @@ class KycForm1ViewController: UIViewController {
// MARK: IBActions // MARK: IBActions
@IBAction func save(_ sender: UIButton) { @IBAction func save(_ sender: UIButton) {
self.kycModel.firstName = self.firstNameTextField.text!
self.kycModel.middleName = self.middleNmaeTextField.text!
self.kycModel.lastName = self.lastNameTextField.text!
self.kycModel.gender = self.genderTextField.text!
self.kycModel.dob = self.dobTextField.text!
self.kycModel.mobile = self.mobileNumberTextField.text!
self.kycModel.email = self.emailTextField.text!
self.kycModel.nativeCountry = self.nativeCountryTextField.text!
self.kycModel.country = self.countryTextField.text!
self.kycModel.province = self.provinceTextField.text!
self.kycModel.occupation = self.occupationTextField.text!
validate()
} }
// MARK: Other Functions // MARK: Other Functions
@ -86,6 +116,25 @@ class KycForm1ViewController: UIViewController {
hideErrorLabels() hideErrorLabels()
setupErrorLabels() setupErrorLabels()
setupErrorTextFields() setupErrorTextFields()
setupDelegates()
}
private func setupDelegates() {
self.firstNameTextField.delegate = self
self.lastNameTextField.delegate = self
self.middleNmaeTextField.delegate = self
self.genderTextField.delegate = self
self.emailTextField.delegate = self
self.dobTextField.delegate = self
self.countryTextField.delegate = self
self.nativeCountryTextField.delegate = self
self.occupationTextField.delegate = self
self.mobileNumberTextField.delegate = self
self.provinceTextField.delegate = self
}
private func validate() {
self.presenter?.validate(model: self.kycModel)
} }
private func hideErrorLabels() { private func hideErrorLabels() {
@ -95,43 +144,70 @@ class KycForm1ViewController: UIViewController {
} }
private func setupErrorLabels() { private func setupErrorLabels() {
self.errorLabels = [firstNameErrorLabel, middleNameErrorLabel, lastNameErrorLabel, genderErrorLabel, dobErrorLabel, mobileNumberErrorLabel, emailErrorLabel, nativeCountryErrorLabel, nativeCountryErrorLabel, provinceErrorLabel, occupationErrorLabel]
self.errorLabelsDict = self.errorLabelsDict =
[ [
FieldKeys.firstName: self.firstNameErrorLabel,
FieldKeys.middleName: self.middleNameErrorLabel,
FieldKeys.lastName: self.lastNameErrorLabel,
FieldKeys.gender: self.genderErrorLabel,
FieldKeys.dob: self.dobErrorLabel,
FieldKeys.mobileNumber: self.mobileNumberErrorLabel,
FieldKeys.email: self.emailErrorLabel,
FieldKeys.nativeCountry: self.nativeCountryErrorLabel,
FieldKeys.country: self.countryErrorLabel,
FieldKeys.province: self.provinceErrorLabel,
FieldKeys.occupation: self.occupationErrorLabel
KycForm1FieldKeys.firstName: self.firstNameErrorLabel,
KycForm1FieldKeys.middleName: self.middleNameErrorLabel,
KycForm1FieldKeys.lastName: self.lastNameErrorLabel,
KycForm1FieldKeys.gender: self.genderErrorLabel,
KycForm1FieldKeys.dob: self.dobErrorLabel,
KycForm1FieldKeys.mobileNumber: self.mobileNumberErrorLabel,
KycForm1FieldKeys.email: self.emailErrorLabel,
KycForm1FieldKeys.nativeCountry: self.nativeCountryErrorLabel,
KycForm1FieldKeys.country: self.countryErrorLabel,
KycForm1FieldKeys.province: self.provinceErrorLabel,
KycForm1FieldKeys.occupation: self.occupationErrorLabel
] ]
} }
private func setupErrorTextFields() { private func setupErrorTextFields() {
self.textfields = [firstNameTextField, lastNameTextField, middleNmaeTextField, genderTextField, dobTextField, mobileNumberTextField, emailTextField, nativeCountryTextField, countryTextField, provinceTextField, occupationTextField]
self.errorTextFieldDict = self.errorTextFieldDict =
[ [
FieldKeys.firstName: self.firstNameTextField,
FieldKeys.middleName: self.middleNmaeTextField,
FieldKeys.lastName: self.lastNameTextField,
FieldKeys.gender: self.genderTextField,
FieldKeys.dob: self.dobTextField,
FieldKeys.mobileNumber: self.mobileNumberTextField,
FieldKeys.email: self.emailTextField,
FieldKeys.nativeCountry: self.nativeCountryTextField,
FieldKeys.country: self.countryTextField,
FieldKeys.province: self.provinceTextField,
FieldKeys.occupation: self.occupationTextField
KycForm1FieldKeys.firstName: self.firstNameTextField,
KycForm1FieldKeys.middleName: self.middleNmaeTextField,
KycForm1FieldKeys.lastName: self.lastNameTextField,
KycForm1FieldKeys.gender: self.genderTextField,
KycForm1FieldKeys.dob: self.dobTextField,
KycForm1FieldKeys.mobileNumber: self.mobileNumberTextField,
KycForm1FieldKeys.email: self.emailTextField,
KycForm1FieldKeys.nativeCountry: self.nativeCountryTextField,
KycForm1FieldKeys.country: self.countryTextField,
KycForm1FieldKeys.province: self.provinceTextField,
KycForm1FieldKeys.occupation: self.occupationTextField
] ]
} }
private func showBorder(textfield :UITextField?) {
guard let textfield = textfield else {return}
textfield.layer.borderColor = Constants.stateRedColor.cgColor
textfield.layer.borderWidth = 1
}
private func show( error: String, label: UILabel?) {
guard let label = label else {return}
label.textColor = Constants.stateRedColor
label.isHidden = false
label.text = error
}
} }
// MARK: KycForm1ViewInterface // MARK: KycForm1ViewInterface
extension KycForm1ViewController: KycForm1ViewInterface { extension KycForm1ViewController: KycForm1ViewInterface {
func show(errors: [String : String]) {
print(errors)
errors.forEach({
let label = errorLabelsDict[$0.key]
self.show(error: $0.value, label: label)
let textfield = errorTextFieldDict[$0.key]
self.showBorder(textfield: textfield)
})
}
} }
extension KycForm1ViewController: IndicatorInfoProvider { extension KycForm1ViewController: IndicatorInfoProvider {
@ -139,3 +215,45 @@ extension KycForm1ViewController: IndicatorInfoProvider {
return IndicatorInfo.init(title: "Personal") return IndicatorInfo.init(title: "Personal")
} }
} }
extension KycForm1ViewController: UITextFieldDelegate {
func textFieldDidBeginEditing(_ textField: UITextField) {
switch textField {
case firstNameTextField:
self.firstNameErrorLabel.isHidden = true
firstNameTextField.layer.borderWidth = 0
case middleNmaeTextField:
self.middleNameErrorLabel.isHidden = true
middleNmaeTextField.layer.borderWidth = 0
case lastNameTextField:
self.lastNameErrorLabel.isHidden = true
lastNameTextField.layer.borderWidth = 0
case genderTextField:
self.genderErrorLabel.isHidden = true
genderTextField.layer.borderWidth = 0
case dobTextField:
self.dobErrorLabel.isHidden = true
dobTextField.layer.borderWidth = 0
case mobileNumberTextField:
self.mobileNumberErrorLabel.isHidden = true
mobileNumberTextField.layer.borderWidth = 0
case emailTextField:
self.emailErrorLabel.isHidden = true
emailTextField.layer.borderWidth = 0
case nativeCountryTextField:
self.nativeCountryErrorLabel.isHidden = true
nativeCountryTextField.layer.borderWidth = 0
case countryTextField:
self.countryErrorLabel.isHidden = true
countryTextField.layer.borderWidth = 0
case provinceTextField:
self.provinceErrorLabel.isHidden = true
provinceTextField.layer.borderWidth = 0
case occupationTextField:
self.occupationErrorLabel.isHidden = true
occupationTextField.layer.borderWidth = 0
default:
break
}
}
}

1
GMERemittance/Module/New Group/kycForm1/User Interface/View/kycForm1ViewInterface.swift

@ -7,4 +7,5 @@
// //
protocol KycForm1ViewInterface: class { protocol KycForm1ViewInterface: class {
func show(errors: [String :String])
} }
Loading…
Cancel
Save