Skip to content

Commit df0009b

Browse files
committed
Added CHANGES
1 parent 81ed490 commit df0009b

2 files changed

Lines changed: 22 additions & 7 deletions

File tree

‎CHANGES.rst‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Changelog
2+
---------
3+
4+
5+
0.2.0 (2013-10-22)
6+
^^^^^^^^^^^^^^^^^^
7+
8+
- Various new validators: ipv4, ipv6, length, number_range, mac_address, url, uuid
9+
10+
11+
0.1.0 (2013-10-18)
12+
^^^^^^^^^^^^^^^^^^
13+
14+
- Initial public release

‎validators/utils.py‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ def func_args_as_dict(func, args, kwargs):
4949
)
5050

5151

52-
@decorator
5352
def validator(func, *args, **kwargs):
54-
value = func(*args, **kwargs)
55-
if not value:
56-
return ValidationFailure(
57-
func, func_args_as_dict(func, args, kwargs)
58-
)
59-
return value
53+
def wrapper(func, *args, **kwargs):
54+
value = func(*args, **kwargs)
55+
if not value:
56+
return ValidationFailure(
57+
func, func_args_as_dict(func, args, kwargs)
58+
)
59+
return value
60+
return decorator(wrapper, func)

0 commit comments

Comments
 (0)