Skip to content

Commit ba2b709

Browse files
authored
Merge pull request #32 from LeanderCS/29
29 | Add more functions as preparation for future updates
2 parents 39d19c1 + edb2c6b commit ba2b709

File tree

15 files changed

+759
-206
lines changed

15 files changed

+759
-206
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ If the data is invalid, a 400 response with an error message will be returned.
123123
# Do something with validated data
124124
id = data.get('id')
125125
zipcode = data.get('zipcode')
126-
126+
city = data.get('city')
127127
128128
129129
See also

docs/changelog.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,31 @@ Changelog
33

44
All notable changes to this project will be documented in this file.
55

6+
[0.1.0] - 2025-03-26
7+
--------------------
8+
9+
Added
10+
^^^^^
11+
- Multiple functions to allow a broader usage aside as decorator
12+
- getErrorMessage
13+
- getRawValue
14+
- getRawValues
15+
- getUnfilteredData
16+
- getValue
17+
- getValues
18+
- hasUnknown
19+
- isValid
20+
- merge
21+
- remove
22+
- replace
23+
- setData
24+
- setUnfilteredData
25+
26+
Removed
27+
^^^^^^^
28+
29+
- IsMimeTypeValidator
30+
631

732
[0.0.10] - 2025-03-06
833
---------------------

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project = "flask-inputfilter"
22
copyright = "2025, Leander Cain Slotosch"
33
author = "Leander Cain Slotosch"
4-
release = "0.0.10"
4+
release = "0.1.0"
55

66
extensions = ["sphinx_rtd_theme"]
77

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,4 @@ If the data is invalid, a 400 response with an error message will be returned.
119119
# Do something with validated data
120120
id = data.get('id')
121121
zipcode = data.get('zipcode')
122+
city = data.get('city')

docs/options/validator.rst

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ The following validators are available:
6666
- `IsJsonValidator`_
6767
- `IsLowercaseValidator`_
6868
- `IsMacAddressValidator`_
69-
- `IsMimeTypeValidator`_
7069
- `IsPastDateValidator`_
7170
- `IsPortValidator`_
7271
- `IsRgbColorValidator`_
@@ -827,36 +826,6 @@ Ensures the input is a string and matches a regular expression pattern for MAC a
827826
IsMacAddressValidator()
828827
])
829828
830-
831-
IsMimeTypeValidator
832-
~~~~~~~~~~~~~~~~~~~
833-
834-
**Description:**
835-
836-
Checks if a value is a valid MIME type. The validator uses a regular expression to verify that the input string follows the typical pattern for MIME types (e.g., "text/html").
837-
838-
**Parameters:**
839-
840-
- **error_message** (*Optional[str]*): Custom error message if the value is not a valid MIME type.
841-
842-
**Expected Behavior:**
843-
844-
Confirms that the input is a string and that it matches the MIME type pattern. Raises a ``ValidationError`` if the value does not match the expected format.
845-
846-
**Example Usage:**
847-
848-
.. code-block:: python
849-
850-
from flask_inputfilter import InputFilter
851-
from flask_inputfilter.Validator import IsMimeTypeValidator
852-
853-
class FileInputFilter(InputFilter):
854-
def __init__(self):
855-
super().__init__()
856-
self.add('mime_type', validators=[
857-
IsMimeTypeValidator()
858-
])
859-
860829
IsPastDateValidator
861830
~~~~~~~~~~~~~~~~~~~
862831
**Description:**

0 commit comments

Comments
 (0)