[+] Check family pin length
This commit is contained in:
@@ -205,13 +205,20 @@ class FamilyVC: UIViewController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Create or join a family
|
||||
*/
|
||||
class FamilyCreateJoinVC: UIViewController
|
||||
{
|
||||
let createMode: Bool
|
||||
@IBOutlet weak var lFamilyNameOrId: UILabel!
|
||||
@IBOutlet weak var bCreateJoin: UIButton!
|
||||
@IBOutlet weak var tNameOrId: UITextField!
|
||||
@IBOutlet weak var tPin: UITextField!
|
||||
|
||||
/**
|
||||
Pass in create mode from FamilyVC
|
||||
*/
|
||||
init?(coder: NSCoder, create: Bool)
|
||||
{
|
||||
createMode = create
|
||||
@@ -228,5 +235,14 @@ class FamilyCreateJoinVC: UIViewController
|
||||
lFamilyNameOrId.text = createMode ? "Family Name" : "Family ID"
|
||||
bCreateJoin.setTitle(createMode ? "Create" : "Join", for: .normal)
|
||||
}
|
||||
|
||||
/**
|
||||
Called when the user clicks create or join button
|
||||
*/
|
||||
@IBAction func btnCreateOrJoin(_ sender: Any)
|
||||
{
|
||||
// Check pin
|
||||
guard let pin = tPin.text, pin.count >= 4 else { msg("Pin Too Weak", "Your family pin must be 4 numbers or more."); return }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user