Patterns
For String
parameters we can specify a pattern that will be matched using regex. Only values that match the given pattern are valid specifications. We can add a pattern like so:
par = String('par', pattern='[Ss]ome [Pp]attern')
Example for valid configuration:
par: "Some pattern"
For an invalid specification a ValueError
is raised:
par: "Invalid"
Results in:
ValueError: "par" Does not match pattern '[Ss]ome [Pp]attern' ('Invalid')