     
     case name = 0,email,password,confirmPassword
     
-    func validate(_ text: String, passToConfirm: String?) -> Bool? {
+    func validate(_ text: String, passToConfirm: String?, minimumPasswordLength: Int) -> Bool? {
         if text == "" {
             return nil
         }

        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
