Skip to content

Commit

Permalink
Merge 73b7719 into 6c645a5
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenrd committed Jul 1, 2020
2 parents 6c645a5 + 73b7719 commit 2b774ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Expand Up @@ -5,7 +5,7 @@
1.15.1 (unreleased)
===================

- Nothing changed yet.
- Fix plurality of error message for fields with min length of 1.


1.15.0 (2020-05-06)
Expand Down
6 changes: 4 additions & 2 deletions src/nti/schema/field.py
Expand Up @@ -253,9 +253,11 @@ def _reraise_validation_error(self, e, value, _raise=False):
def _fixup_too_short(self, e, value):
# Note we're capitalizing the field in the message.
e.i18n_message = _(
u'${field} is too short. Please use at least ${minLength} characters.',
u'${field} is too short. Please use at least one character.',
msgid_plural=u'${field} is too short. Please use at least ${minLength} characters.',
mapping={'field': self.__fixup_name__.capitalize(),
'minLength': e.bound}
'minLength': e.bound},
number=e.bound
)
e.args = (self.__fixup_name__.capitalize() + ' is too short.',
self.__fixup_name__,
Expand Down

0 comments on commit 2b774ed

Please sign in to comment.