I am trying to validate email to access alphanumeric characters
<script type = "text/javascript">
function checkField(email)
{
if (/[^0-9a-bA-B\s]/gi.test(email.value))
{
alert ("Only alphanumeric characters and spaces are valid in
this field");
email.value = "";
email.focus();
return false;
}
}
</script>
it must contain alphabets and numerics ex:"test123@gmail.com","admin890@gmail.com" , "abc456@gmail.com"
.. how can rewrite this code.??