API fix for cli_valid