macro_rules! is_valid { ( $name:ident, $type:ty ) => { ... }; }
This macro generates a function that takes a string as input and returns a boolean.