Skip to content

Commit 8a1e719

Browse files
committed
Refactors and version update
1 parent ac26023 commit 8a1e719

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ build/
33
dist/
44
__pycache__/
55
*.egg-info
6-
*.pyc
6+
*.pyc
7+
test.py

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ All parameters can have default values, and automatic validation.
6363
* min_int: int, Specifies the minimum number for an int input
6464
* max_int: int, Specifies the maximum number for an int input
6565
* whitelist: str, A string containing allowed characters for the value
66-
* blacklist: str, A string containing forbidden characters for the value
66+
* blacklist: str, A string containing forbidden characters for the value
67+
* pattern: str, A regex pattern to test for string matches
6768

6869
`File` has the following options:
6970
* content_types: array of strings, an array of allowed content types.

flask_parameter_validation/parameter_types/parameter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(
2323
max_int=None, # int: max number (if val is int)
2424
whitelist=None, # str: character whitelist
2525
blacklist=None, # str: character blacklist
26-
pattern=None, # str: regexp pattern
26+
pattern=None, # str: regexp pattern
2727
):
2828
self.default = default
2929
self.min_length = min_length
@@ -81,7 +81,7 @@ def validate(self, values):
8181
f"must be smaller than {self.max_int}."
8282
)
8383

84-
# Regexp
84+
# Regexp
8585
if self.pattern is not None:
8686
if not re.match(self.pattern, value):
8787
raise ValidationError(

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
setup(
1313
name='Flask-Parameter-Validation',
14-
version='1.0.23',
14+
version='1.0.24',
1515
url='https://github.com/Ge0rg3/Flask-Parameter-Validation',
1616
license='MIT',
1717
author='George Omnet',
18-
author_email='[email protected]',
18+
author_email='[email protected]',
1919
description='Get and validate all Flask input parameters with ease.',
2020
long_description=long_description,
2121
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)