Greetings. I ask for help in making a regular account to verify the login. Login must contain from 4 to 10 characters and may consist of numbers and letters of the Latin alphabet and contain an underscore and / or hyphen.
Here is the mock code, but, you guessed it, it doesn't work.
if(/[^0-9a-zA-Z\-\_]{4,10}$/g.test(str)) res.innerHTML = 'good'; else res.innerHTML = 'bad';
/^[\w-]{4,10}$/i
- Alex Kapustin