Why is this regex returning true for everything? [duplicate]

I wanted my regex to return true only for digit-only inputs, but it’s returning true for everything.

const regex = new RegExp(/[0-9]*/g);
console.log(e.target.value);
console.log(regex.test(e.target.value));
if (regex.test(e.target.value)) {field.onChange(e);}

enter image description here
I had a more complete regex but it kept on not working so I simplified it to be a digit-only regex and that doesn’t work either.