Function Name.validateName
The name portion of a fullname, record field names, and enum symbols must: - start with \[A-Za-z_\] - subsequently contain only \[A-Za-z0-9_\]
static string validateName
(
string name
) @safe;
See Also
https://avro.apache.org/docs/current/spec.html#names
Example
import std .exception : assertThrown, assertNotThrown;
assertThrown!SchemaParseException(validateName(null));
assertThrown!SchemaParseException(validateName(""));
assertThrown!SchemaParseException(validateName("3a"));
assertThrown!SchemaParseException(validateName("h@t"));
assert(validateName("hat3") == "hat3");
assert(validateName("_fish") == "_fish");