Fix: Validate PIN

This commit is contained in:
kougyokugentou 2021-01-30 12:53:08 -08:00
parent d41de3f84d
commit a0fc5358cc
1 changed files with 7 additions and 0 deletions

View File

@ -104,6 +104,13 @@ namespace GreatHomeChildcare
}
}
// validate pin
if(strPin.Length < 4)
{
MessageBox.Show("Please enter a 4-digit pin number.", "Great Home Childcare", MessageBoxButtons.OK, MessageBoxIcon.None);
return;
}
checkExistingGuardian = SqliteDataAccess.GetGuardianByPin(Int32.Parse(strPin));
//If this is a new guardian, check to see if that pin is in use.