B
B
Boroborod2019-10-07 13:47:55
JavaScript
Boroborod, 2019-10-07 13:47:55

How to organize validation when entering data?

Hello, I need to organize the input of numeric values ​​​​from the console using readline, separated by commas, by pressing a comma, the program checks the entered values ​​for correctness (the presence of letters, special characters), if the data is entered incorrectly, the program displays a message about this, deletes this data and continues typing until the user presses enter. Help someone with what they can, I read a lot of everything, I can’t figure out how to implement it, I will be grateful for useful links on this topic or examples of solving similar problems, thanks!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Epikhin, 2019-10-07
@leshiple

Check out this module https://www.npmjs.com/package/inquirer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question