I have a method which allows me to reach competitor information which is saved in my class.
It already blocks empty inputs with a message. If the user inputs a number which is non-existent, the program blocks with another message.
I would like to implement a functionality where, if any form of text input is true, the input is classed as invalid so the user has to change their input to a valid value instead.
Here is my piece of code where I pick which competitor needs to be printed. I am new to stackoverflow so please let me know if more code needs to be shared by my side.
public void CompetitorToPrint(string NumberTextBoxInput)
{
Skier searchCompetitor = ActiveLodge.FindCompetitor(NumberTextBoxInput);
if (searchCompetitor == null)
MessageBox.Show("Competitor number does not exist. Please try again. ");
else
EditCompetitor(searchCompetitor);
}