A pattern of HTML `input` element to restrict use of UTF-8 4-byte characters
npm install non-4byte-chars-pattern





``javascript
import non4byteCharsPattern from 'non-4byte-chars-pattern';
const input = document.createElement('input');
input.setAttribute('pattern', non4byteCharsPattern);
input.value = 'Hello (^ ^)';
input.validity.patternMismatch; //=> false
input.value = 'Hello 🤗';
input.validity.patternMismatch; //=> true
`
``
npm install non-4byte-chars-pattern
``
bower install non-4byte-chars-pattern
Type: String
Note that this pattern regards an empty string '' as valid. If you want to disallow blank input, use required attribute instead.
non-4byte-chars-regex - RegExp` version of this module