My use case is to validate a String only consists of + and the numbers. I have tried with so many regexes but couldn't able to fix my issue.
I have used /^[0-9]+$/
regex but it is failed in the 2 nd and 3rd(Obviously it is because it is having A Character) input.
My need is,
if the input is 00000094777216903 - TRUE
if the input is +947777216903 - TRUE (+ is fine if it is in the beginning of the string)
if the input is +947777216903A - FALSE
if the input is 0000777216903A - FALSE
Can anyone help me to achieve my need in JS.