Regex controlled Input in React.js

Isn’t it very common to have input having some restrictions, examples include: allowing at most 2 deimals, only alphanumeric, so much more