aiteamutils 0.2.117__py3-none-any.whl → 0.2.119__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
aiteamutils/validators.py CHANGED
@@ -276,29 +276,15 @@ def _create_validator(field_names: tuple[str, ...],
276
276
  return cls
277
277
  return decorator
278
278
 
279
- def date_validator(*fields):
280
- """날짜 형식 검증 데코레이터"""
281
- def decorator(cls):
282
- for field in fields:
283
- @field_validator(field)
284
- def validate_date(cls, value):
285
- if not value:
286
- return value
287
- try:
288
- if isinstance(value, str):
289
- datetime.strptime(value, "%Y-%m-%d")
290
- elif isinstance(value, datetime):
291
- return value.date()
292
- return value
293
- except ValueError:
294
- raise CustomException(
295
- ErrorCode.INVALID_DATE_FORMAT,
296
- detail=f"{field}|{value}",
297
- source_function="Validator.validate_date"
298
- )
299
- setattr(cls, f'validate_{field}', validate_date)
300
- return cls
301
- return decorator
279
+ def date_validator(*field_names: str):
280
+ """날짜 필드 유효성 검사 데코레이터"""
281
+ return _create_validator(
282
+ field_names=field_names,
283
+ validate_func=Validator.validate_date,
284
+ field_type=date,
285
+ error_code=ErrorCode.INVALID_DATE_FORMAT,
286
+ source_prefix="date_validator"
287
+ )
302
288
 
303
289
  def datetime_validator(*field_names: str):
304
290
  """날짜+시간 필드 유효성 검사 데코레이터"""
@@ -308,4 +294,4 @@ def datetime_validator(*field_names: str):
308
294
  field_type=datetime,
309
295
  error_code=ErrorCode.INVALID_DATETIME_FORMAT,
310
296
  source_prefix="datetime_validator"
311
- )
297
+ )
aiteamutils/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  """버전 정보"""
2
- __version__ = "0.2.117"
2
+ __version__ = "0.2.119"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiteamutils
3
- Version: 0.2.117
3
+ Version: 0.2.119
4
4
  Summary: AI Team Utilities
5
5
  Project-URL: Homepage, https://github.com/yourusername/aiteamutils
6
6
  Project-URL: Issues, https://github.com/yourusername/aiteamutils/issues
@@ -8,8 +8,8 @@ aiteamutils/database.py,sha256=2D4YX8sfxZCvhKoqKSNbxyIZTb9Wc2-jsNBpLA7T7s0,19939
8
8
  aiteamutils/enums.py,sha256=7WLqlcJqQWtETAga2WAxNp3dJTQIAd2TW-4WzkoHHa8,2498
9
9
  aiteamutils/exceptions.py,sha256=zRwtEAhb6HcruZ2pFyraxdpo5YWtBTLPIWtz6lKUVU0,16287
10
10
  aiteamutils/security.py,sha256=McUl3t5Z5SyUDVUHymHdDkYyF4YSeg4g9fFMML4W6Kw,11630
11
- aiteamutils/validators.py,sha256=uUMvzOFmyGvye3A14yTHa--zX94UnyPUQ9xIT5PEamU,12546
12
- aiteamutils/version.py,sha256=8RreQUdCbXohQcL3rRH-K0_uQ0CayjeeUi183RgA39c,43
13
- aiteamutils-0.2.117.dist-info/METADATA,sha256=MsEUDyoRMYOsI_dPdS_zNLHkY8W4L580oJXZNkZc7p8,1719
14
- aiteamutils-0.2.117.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
- aiteamutils-0.2.117.dist-info/RECORD,,
11
+ aiteamutils/validators.py,sha256=aDhXM8ZPK7IxnSf1RDaHpbbIY-e_YAhWMZckXYnKqok,11969
12
+ aiteamutils/version.py,sha256=g4tVi7vagAwEGrphlw-Bv2ejNTs6cxcsIkNU_2umSiw,43
13
+ aiteamutils-0.2.119.dist-info/METADATA,sha256=pjZU6rT-rIWp02pSB8BFlBlRP8cTXb1SuEZ59ZwwWQM,1719
14
+ aiteamutils-0.2.119.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
15
+ aiteamutils-0.2.119.dist-info/RECORD,,