Closed LinYunling closed 1 week ago
Here's a simple example:
import regex
schema Attr:
attr: {str:str}
check:
all k in attr {
regex.match(k, r"^[a-z][a-z0-9]{0,63}$")
}
a = Attr{
attr: {"+==": "aaa"}
}
thanks
Define a schema, use dict type:
How to check the key and value? Such as key match ^[a-z][a-z0-9]{0,63}$