fix postgres config validation (#380)

* fix postgres config validation

* dont remove types

---------

Co-authored-by: Dinesh Yeduguru <dineshyv@fb.com>
This commit is contained in:
Dinesh Yeduguru 2024-11-05 15:09:04 -08:00 committed by GitHub
parent a2351bf2e9
commit 4dd01eeaa1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,8 +54,9 @@ class PostgresKVStoreConfig(CommonConfig):
password: Optional[str] = None
table_name: str = "llamastack_kvstore"
@classmethod
@field_validator("table_name")
def validate_table_name(self, v: str) -> str:
def validate_table_name(cls, v: str) -> str:
# PostgreSQL identifiers rules:
# - Must start with a letter or underscore
# - Can contain letters, numbers, and underscores