The binary operator '> =' cannot be applied to operands of type String.IndexDistance? (aka 'Optional <Int>') and 'Int'
in Swift 4 I am trying to compare the length of a UITextField text with a minimum length:
if textFieldPassword.text?.count >= 8 { } but i get an error
Binary operator '>=' cannot be applied to operands of type 'String.IndexDistance?' (aka 'Optional<Int>') and 'Int'
Ironically, he works with
textFieldPassword.text?.count == 8 Can someone help me?
+5