You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4.0.0 Breaking change, because CI jobs right now relies on the generated message pattern.
ValidationError messages are currently defined from a fixed pattern and a bit confusing.
"field must ne x but is is x"
"field must is_type_of but it is x"
"field must not_in [1,2,3] but it is 1"
Messages are "ok" but not very descriptive, currently users have a way to set better messages.
Validator("name", eq=3, messages={"operations": "{name} has value {value} which is incorrect for {operation}({op_value}) !"})
I want to improve those messages, I dont have ideas right now on how to implement but I want more natural messages like:
"ValidationError: name must not be equal to x"
"ValidationError: invalid type 'int' for field 'name: str'
Also, ValidationError should expose only the data from Validator such as operations, op_value, env but never print out the current value of the settings.
On Schema
pizza_topping: Annotated[str, Ne("pineapple", msg="We dont respect pineapple on Pizza!")]
The text was updated successfully, but these errors were encountered:
4.0.0 Breaking change, because CI jobs right now relies on the generated message pattern.
ValidationError messages are currently defined from a fixed pattern and a bit confusing.
Messages are "ok" but not very descriptive, currently users have a way to set better messages.
I want to improve those messages, I dont have ideas right now on how to implement but I want more natural messages like:
Also, ValidationError should expose only the data from
Validator
such as operations, op_value, env but never print out the current value of the settings.On Schema
The text was updated successfully, but these errors were encountered: