Here is a simple validation using repoCSS.js that lets you run RegEX validation on input fields and turns the input field background red when it detects a pattern.
If you are having trouble with the pen, try the archived copy on GitHub
RegEx Validation Snippet
See the Pen Regex test on value with reproCSS by Tommy Hodgins (@tomhodgins) on CodePen.0