A Kotlin library for validating text input in Android TextInputLayout with built-in rules and custom rule support.
Validator is an Android library that provides a clean, declarative API for validating user input in TextInputLayout components. It solves the problem of repetitive and error-prone form validation code by offering a wide range of built-in validation rules and the ability to create custom rules. The library supports both single-batch and continuous validation modes with clear success/error callbacks.
Android developers building forms in Kotlin who need reliable input validation with minimal boilerplate code. Particularly useful for projects using Material Design's TextInputLayout components.
Developers choose Validator for its extensive set of pre-built validation rules, intuitive conditional validation system, and seamless integration with Android's TextInputLayout. Its declarative Kotlin DSL makes validation logic easy to read and maintain compared to manual validation implementations.
A tool to validate text inside TextInputLayout
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Includes over 25 predefined rules for common cases like email, password, and credit card validation, as listed in the README, reducing boilerplate code.
Supports AND/OR conditions with customizable error messages, enabling complex validation logic as shown in the username validation example.
Offers SINGLE for batch validation and CONTINUOUS for real-time feedback, with visual GIFs in the README demonstrating improved UX.
Allows extending the base Rule class to create custom validation, exemplified by the CustomRule code snippet for tailored logic.
Specifically designed for TextInputLayout, making it unsuitable for other Android input components without additional workarounds or integrations.
Uses a Kotlin DSL that may be less intuitive for Java-only projects, requiring Kotlin knowledge for optimal use, as seen in the code examples.
Distributed via JitPack instead of Maven Central, which some developers might find less stable or prefer for production-grade dependencies.