🔐 passcheck
passcheck is a flexible and lightweight password validation crate for Rust.
It allows you to define custom rules for checking password strength and structure — use only what you need!
🚀 Features
- ✅ Rule-based validation system
- ✅ Add only the checks you want: length, uppercase/lowercase, number, special char, etc.
- ✅ Supports custom error messages per rule via
Option<&str> - ✅ Lightweight and dependency-free
- ✅ Easy to use and extend with a fluent API
📦 Installation
Add this to your Cargo.toml:
[]
= "0.2.0"
🎯 Usage Example
use PasswordChecker;
🔧 Available Rules
min_length(n, Option<&str>) → Requires password to be at least n characters
require_upper_lower(Option<&str>) → Requires at least one uppercase and one lowercase letter
require_number(Option<&str>) → Requires at least one digit
require_special_char(Option<&str>) → Requires at least one special character
📄 License MIT
💻 Author Made with ❤ + ☕ by Ali