Skip to content

v1.0.3

Choose a tag to compare

@CSharplie CSharplie released this 16 Apr 18:03
· 50 commits to main since this release
7b51d40

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'"] }
]