Share this page 

Check for "letter-only" INPUTTag(s): Form


To check for regular ASCII (no accent)
<script>
function validate(strValue) {
  var objRegExp  = /^[a-z]+$/;
  return objRegExp.test(strValue);
}
</script>
A more friendly approach is to accept accented letters too!
<script>
function validate(strValue) {
  var objRegExp  = /^[a-z\u00C0-\u00ff]+$/;
  return objRegExp.test(strValue);
}

Try it here :
If you want to accept a space then
  var objRegExp  = /^[a-z\u00C0-\u00ff\s]+$/;