Skip to main content

validate_short_code

Function validate_short_code 

Source
pub fn validate_short_code(code: &str) -> Result<String, PairingError>
Expand description

Validate and normalize a pairing short code.

Args:

  • code: The raw short code input from the user.

Usage:

let normalized = validate_short_code("ABC-123")?;
assert_eq!(normalized, "ABC123");