Regex input field

What
An input field that is validated to a regex expression, and has a minimum and maximum length.

Why
Sometimes you need an input to validate to a specific set of criteria fx. alfanum between 4 and 12 characters, or an 8 digit number.

Having a Regex input type would solve this problem.