User input validation in Raptor flowchart


In this article, we will learn how to perform user input validation in the RAPTOR flowchart. In this example, we will prompt the user to enter a number and we will display the number. It is a fairly 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 the 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 a number is invalid
input. For example, if we enter String instead of a number, the flowchart would prompt that the input is invalid.


Flowchart Input validation


Is_Number() function returns true if the input is number.



Input validation Examples

The above example stops displaying the error. We can even display an error and prompt the user to try again if the user enters invalid input. Example to try again can be found here:

Recursive way to validate user input in the flowchart:

Similar functions

Similar functions that are useful to validate input are:
This function returns true when the argument is a Character.
This function returns true when the argument is a String.

This function returns true when the argument is an Array.


RAPTOR tutorial page:

Flowchart examples:

RAPTOR official website: