Repository navigation
v1.0.3
new features
regex on validset
It's now possible to setup a validset with value and regex.
Exemple :
controls = [
{ "name": "vehicles", "type": "dict" },
{ "name": "vehicles.cars", "type": "list" },
# The validset allow value "red", "bleue" and hexadecimal color (like #FFBB19)
{ "name": "vehicles.cars.color", "validset": ["red", "blue", r"^#(?:[0-9a-fA-F]{3}){1,2}$"] },
{ "name": "vehicles.cars.is_broken", "type": "boolean", "default": False },
{ "name": "vehicles.cars.buy_date" },
{ "name": "vehicles.cars.type", "default": "usual", "expressions": ["if color == 'red' return 'sportive'"] }
]