These are the JavaScript validation codes that I came across:
<script type="text/javascript">
function validate_input(form){
username_pattern=/^[a-zA-Z0-9\_\-]{6,100}$/;
if (!username_pattern.test(form.username.value)){
alert ('Username must be at least 6 characters long and can only contain letters or numbers!');
form.username.focus();
return false;
}
return (true);
}
</script>
I have a question regarding this part:
username_pattern=/^[a-zA-Z0-9\_\-]{6,100}$/;
Can anyone explain how to interpret this type of format? Does it specify letters, numbers, or special characters?