Skip to content

Commit 739b8b8

Browse files
committed
Updated RunInput to check for folder string format.
1 parent ea1a3f3 commit 739b8b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

simvue/models.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from datetime import datetime
22

3-
from pydantic import BaseModel
3+
import re
4+
from pydantic import BaseModel, constr
45
from typing import Optional, List, Dict, Union
56
from enum import Enum
67

@@ -10,5 +11,5 @@ class RunInput(BaseModel):
1011
metadata: Optional[Dict[str, Union[str, int, float, None]]]
1112
tags: Optional[List[str]]
1213
description: Optional[str]
13-
folder: str
14+
folder: constr(regex=r'^/.*')
1415
status: Optional[str]

0 commit comments

Comments
 (0)