Module garde::rules::credit_card
source · Expand description
Credit card validation using the card_validate crate.
#[derive(garde::Validate)]
struct Test {
#[garde(credit_card)]
v: String,
}The entrypoint is the CreditCard trait. Implementing this trait for a type allows that type to be used with the #[garde(credit_card)] rule.
This trait has a blanket implementation for all T: AsRef<str>.