# NUMBER

Paid feature

As explained in the How it works article, you can use components such as NUMBER to collect data from the smartphone.

The NUMBER component will open a dialog box with a numeric keyboard, like this:

 

# Example

Suppose that you want to collect the quantity of a product from the smartphone.

You can do it by adding a NUMBER component to your output template:

Then, when you scan a barcode, the app will open a dialog box with a numeric keyboard.

See it in action:

ded

# Advanced

# Filters

Filters allow you to validate the input using regular expressions.

# Example

If you want to collect only positive numbers, you can use the following filter:

^[1-9]\d*$

This way it will accept 134556, 248455, 315151, etc. but it will not accept 0, -1, -2, etc.

# Don't know how to use regular expressions?

You can use ChatGPT to generate the regular expression for you.

Example prompt:

Write a regular expression to validate strings that start with a number and ends with 0. Output only the regex that I should put between slashes in js.

View result