     @IBInspectable var invalidBgColor: UIColor = UIColor.red
     @IBInspectable var invalidTextColor: UIColor = UIColor.red
     @IBInspectable var invalidImage: UIImage? = UIImage(named: "PRGVFInvalid")
+
+    // Minimum length for password field
+    @IBInspectable var passwordMinLength: Int = 6 {
+        didSet {
+            minimumPasswordLength = passwordMinLength
+        }
+    }
     
     // getter for textfield's text
     public var text: String? {

        case .email:
            return isValidEmail(email: text)
        case .password:
            return text.characters.count >= 6
        case .confirmPassword:
            return passToConfirm != nil && passToConfirm == text
            }

            otherPasswordField?.isValid = nil
        }
        if validationMode == .confirmPassword {
            if validationMode.validate(textField.text!,
                                       passToConfirm: otherPasswordField?.text,
                                       minimumPasswordLength: minimumPasswordLength) == true {
                _ = textFieldShouldReturn(textField)
            } else {
                isValid = nil
