1 2 3 4 5 6 7 8 9 10 11 12
use super::Recipe; pub fn validate(recipe: &Recipe) -> Vec<String> { let mut errors = Vec::new(); if recipe.name.is_empty() { errors.push("recipe name is empty".into()); } if recipe.match_command.is_empty() { errors.push("match_command is empty".into()); } errors }