Skip to content

Commit

Permalink
Clarify documentation on error messages format
Browse files Browse the repository at this point in the history
  • Loading branch information
maximkulkin committed Apr 26, 2016
1 parent d5f8cfa commit 7212047
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions marshmallow/exceptions.py
Expand Up @@ -12,8 +12,8 @@ class ValidationError(MarshmallowError):
"""Raised when validation fails on a field. Validators and custom fields should
raise this exception.
:param message: An error message, list of error messages, or dict of
error messages.
:param message: An error message (string), list of error messages (as strings),
or dict of error messages.
:param list field_names: Field names to store the error on.
If `None`, the error is stored in its default location.
:param list fields: `Field` objects to which the error applies.
Expand All @@ -24,8 +24,8 @@ def __init__(self, message, field_names=None, fields=None, data=None, **kwargs):
messages = [message]
else:
messages = message
#: String, list, or dictionary of error messages.
#: If a `dict`, the keys will be field names and the values will be lists of
#: String, list of strings, or dictionary of error messages.
#: If a `dict`, the keys will be field names and the values will be error
#: messages.
self.messages = messages
#: List of field objects which failed validation.
Expand Down

0 comments on commit 7212047

Please sign in to comment.