Change validation to validatesOnDemand

pull/2/head
Michael Scoff 7 years ago
parent fe2d89f791
commit 3434889116
  1. 4
      Trust/Wallet/CreateWalletViewController.swift
  2. 4
      Trust/Wallet/ImportWalletViewController.swift

@ -32,7 +32,7 @@ class CreateWalletViewController: FormViewController {
<<< AppFormAppearance.textFieldFloat(tag: Values.password) {
$0.add(rule: RuleRequired())
$0.validationOptions = .validatesOnChange
$0.validationOptions = .validatesOnDemand
}.cellUpdate { cell, row in
cell.textField.isSecureTextEntry = true
cell.textField.textAlignment = .left
@ -41,7 +41,7 @@ class CreateWalletViewController: FormViewController {
<<< AppFormAppearance.textFieldFloat(tag: Values.passwordRepeat) {
$0.add(rule: RuleRequired())
$0.validationOptions = .validatesOnChange
$0.validationOptions = .validatesOnDemand
}.cellUpdate { cell, row in
cell.textField.isSecureTextEntry = true
cell.textField.textAlignment = .left

@ -31,13 +31,11 @@ class ImportWalletViewController: FormViewController {
<<< AppFormAppearance.textArea(tag: Values.keystore) {
$0.placeholder = "Keystore JSON"
$0.textAreaHeight = .fixed(cellHeight: 100)
$0.tag = Values.keystore
$0.add(rule: RuleRequired())
}
<<< AppFormAppearance.textFieldFloat(tag: Values.password) {
//$0.add(rule: RuleRequired())
$0.validationOptions = .validatesOnChange
$0.validationOptions = .validatesOnDemand
}.cellUpdate { cell, row in
cell.textField.isSecureTextEntry = true
cell.textField.textAlignment = .left

Loading…
Cancel
Save