Check if address is valid

pull/2/head
Michael Scoff 7 years ago
parent c359006eef
commit 65a465f2c2
  1. 2
      Trust/UI/Form/EthereumAddressRule.swift

@ -14,7 +14,7 @@ public struct EthereumAddressRule<T: Equatable>: RuleType {
public func isValid(value: T?) -> ValidationError? {
if let str = value as? String {
return CryptoAddressValidator.isValidAddress(str) ? validationError : nil
return !CryptoAddressValidator.isValidAddress(str) ? validationError : nil
}
return value != nil ? nil : validationError
}

Loading…
Cancel
Save