generated from dopt-python/py311
nested validation and error messages
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# %%
|
||||
import dataclasses as dc
|
||||
import enum
|
||||
import re
|
||||
|
||||
from PySide6.QtCore import QDate, Qt
|
||||
|
||||
@@ -27,6 +28,18 @@ class FormField:
|
||||
self.label += "*"
|
||||
|
||||
|
||||
# %%
|
||||
DYNAMIC_LIST_KEY_PATTERN = r"-\[(\d+)\]"
|
||||
key = "Schulbildung-[12].7b8da0f7-7a0e-4f71-878a-85616099e849"
|
||||
|
||||
matches = re.search(DYNAMIC_LIST_KEY_PATTERN, key)
|
||||
|
||||
# %%
|
||||
matches
|
||||
|
||||
# %%
|
||||
matches.group(1)
|
||||
|
||||
# %%
|
||||
t_str = "asd.yxcxc.dfgjj.aasdsdsdsd.sdsdsdsd"
|
||||
splitted = t_str.split(".")
|
||||
|
||||
Reference in New Issue
Block a user