You can use regex as :^(?=.*[1-9])\d{1,10}$
Explaination :
^
assert position at start of the string
(?=.*[1-9])
Positive Lookahead - Assert that the regex below can be
matched .* matches any character (except newline) Quantifier: *
Between zero and unlimited times, as many times as possible, giving
back as needed [greedy]
[1-9] match a single character present in the list below 1-9 a
single character in the range between 1 and 9
\d{1,10}
match a digit [0-9] Quantifier: {1,10} Between 1 and 10
times, as many times as possible, giving back as needed [greedy]
$
assert position at end of the string
console.log("1".match(/^(?=.*[1-9])\d{1,10}$/));
console.log("1111123455".match(/^(?=.*[1-9])\d{1,10}$/));
console.log("0000".match(/^(?=.*[1-9])\d{1,10}$/));
console.log("0".match(/^(?=.*[1-9])\d{1,10}$/));
console.log("0000000000".match(/^(?=.*[1-9])\d{1,10}$/));