Skip to main content

validate_tail

Function validate_tail 

Source
pub fn validate_tail(tail: &[String], schema: &Schema) -> Result<(), String>
Expand description

Validate the user’s extra argv tail against a schema. Always called before run::exec_command — the parser’s lenient-unknowns mode is keyed off schema.strict so choice validation on declared flags fires regardless, while unknown-flag rejection stays opt-in.

The tokenizer from crate::args::parser is reused so “did you mean” suggestions, cluster, and equals handling come for free.