In this article, we will learn how to perform user input validation in raptor flowchart. In this example, we will prompt the user to enter a number and we will display the number. It is fairly an easy example. But, the idea is to understand how do we validate the input.
User input validation
Sometimes, we get invalid inputs. For example, we asked user to input a number. But,
the user might enter invalid inputs like strings etc. In this flow chart we will see
how to handle the situation.
Launch the Raptor tool.
Drag & Drop an input symbol to the work area in middle to the start and stop symbols.
Enter the user prompt : “Please enter a number”
We will store the input into a variable called n.
Now place a selection symbol.
We will check the input with function Is_Number().
In this flowchart context, valid input is a number. Anything, other than number is invalid
Is_Number() function returns true if the input is number.
More Raptor flowchart examples at: Raptor Tutorial