Restricted Input is an open-source Maven project that utilizes Spring constraint
annotations to validate user input. It aims to be a comprehensive solution for all
your validation needs.
Currently, the project supports Restricted Input Annotations for specifying allowed
and prohibited strings/regex, phone number validation, and alphanumeric input
checks.
The idea behind Restricted Input was to create a flexible platform for all types of
validations, allowing customization to fit specific requirements. It was born out of
the need for a library that
offered the flexibility to restrict certain words, support regex, and whitelist
specific terms. Yes, the requirement was crazy, which is why I could not find
anything that does this! So, I decided
to build it, and while I was at it, I thought why not expand it even more? The
project continues to expand its features, with the goal of becoming a one-stop shop
for input validations.
Currently, I am planning to add a feature that detects if the input is a dangerous
one (SQL injection, XSS, etc.) and rejects it.