From e0248f564131a1902b3815affc7b2a5b7290b51f Mon Sep 17 00:00:00 2001 From: Danny Mackey Date: Thu, 31 Aug 2023 23:34:38 -0400 Subject: [PATCH] Moved strip_nulls_after validator to messages.py --- ror_server_bot/ror_bot/models/validators.py | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 ror_server_bot/ror_bot/models/validators.py diff --git a/ror_server_bot/ror_bot/models/validators.py b/ror_server_bot/ror_bot/models/validators.py deleted file mode 100644 index dcc8b16..0000000 --- a/ror_server_bot/ror_bot/models/validators.py +++ /dev/null @@ -1,12 +0,0 @@ -from pydantic import field_validator - - -def strip_nulls_after(*fields: str): - """A validator that strips null characters from provided fields.""" - def __strip_null_character(v: str) -> str: - return v.strip('\x00') - return field_validator( - *fields, - mode='after', - check_fields=False - )(__strip_null_character)