Jump to content

Does a-z in regex validate european charachters?


shadiadiph

Recommended Posts

<html>
<head>
<script type="text/javascript">
function invalidInput(text)
{
    var invalidChars = /[$%@!]/
    return invalidChars.test(text);
}
function checkInput()
{
    var inputText = document.getElementById('input').value;
    if(invalidInput(inputText))
    {
alert('Input was NOT valid');
    }
    else
    {
alert('Input was valid');
    }
    return;
}
</script>
</head>

<body>
Input: <input type="text" name="input" id="input" />
<br />
<button onclick="checkInput();">Test</button>
</body>
</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.