You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
collection: str=Field(description="Name of the KVStore Collection. Note that collection MUST equal the name. This is a duplicate field, so it will be removed eventually.")
191
193
fields: list[str] =Field(description="The names of the fields/headings for the KVStore.", min_length=1)
192
194
193
-
194
-
@model_validator(mode="after")
195
-
defvalidate_collection(self)->Self:
196
-
ifself.collection!=self.name:
197
-
raiseValueError("Collection MUST be the same as Name of the lookup, but they do not match")
198
-
returnself
195
+
@field_validator("fields", mode='after')
196
+
@classmethod
197
+
defensure_key(cls, values: list[str]):
198
+
ifvalues[0]!="_key":
199
+
raiseValueError(f"fields MUST begin with '_key', not '{values[0]}'")
0 commit comments