Skip to main content

resolve_length

Function resolve_length 

Source
fn resolve_length(
    min_length: Option<u32>,
    max_length: Option<u32>,
) -> Result<u8, PasswordRulesError>
Expand description

Resolves the final password length from the (un-clamped) min_length/max_length parsed from the input, applying the SDK’s [MINIMUM_PASSWORD_LENGTH, MAXIMUM_PASSWORD_LENGTH] clamp and validating that min_length <= max_length.