     func textFieldDidEndEditing() {
         checkText()
     }
+
+    func addIconToTextField() {
+        self.textField.leftViewMode = UITextFieldViewMode.always
+        let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 40, height: 16))
+        imageView.image = icon
+        imageView.contentMode = .scaleAspectFit
+        self.textField.leftView = imageView
+    }
 }


    var icon: UIImage? {
        didSet {
            configureView()
        }
    }
    var errorString: String?

        self.textField.backgroundColor = Color.LoginTextView.TextField.background
        self.textField.layer.cornerRadius = 5
        self.layer.cornerRadius = 5

        setupConstraints()
    }
