Skip to content

Commit 96d486c

Browse files
committed
feat: enhance the str pattern used for sameAs
1 parent 230b4c3 commit 96d486c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dandischema/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,10 @@ def contributor_musthave_contact(
16851685
Annotated[
16861686
str,
16871687
StringConstraints(
1688-
pattern=rf"^dandi://{UNVENDORED_ID_PATTERN}/\d{{6}}\S*$"
1688+
pattern=(
1689+
rf"^dandi://{UNVENDORED_ID_PATTERN}/\d{{6}}"
1690+
rf"(@(draft|{VERSION_NUM_PATTERN}))?(/\S+)?$"
1691+
)
16891692
),
16901693
]
16911694
]

0 commit comments

Comments
 (0)