I have a regex
/^([a-zA-Z0-9]+)$/
this just allows only alphanumerics but also if I insert only number(s) or only
And an idea with a negative check.
/^(?!\d*$|[a-z]*$)[a-z\d]+$/i
^(?! at start look ahead if string does not\d*$ contain only digits | or[a-z]*$ contain only letters[a-z\d]+$ matches one or more letters or digits until $ end.Have a look at this regex101 demo
(the i flag turns on caseless matching: a-z matches a-zA-Z)