Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Not set default required error message always #60

Conversation

Maks3w
Copy link
Member

@Maks3w Maks3w commented Sep 3, 2015

Skip if a previous one was set

Partial fix for #28.

This does not allow to translate automatically with multiple localizations.

Skip if a previous one was set
@Maks3w Maks3w added the bug label Sep 3, 2015
@Maks3w Maks3w added this to the 2.4.8 milestone Sep 3, 2015
{
$input = $this->input;
$input->setRequired(true);
$input->setErrorMessage('fooErrorMessage');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't what #28 was getting at.

Prior to 2.4, a required input that was provided an empty value would return [ 'isEmpty' => "Value is required and can't be empty"] for the messages; that's what the reporter wants to happen again.

I'll work on this using your patch as a start, and submit an alternate PR.

weierophinney added a commit to weierophinney/zend-inputfilter that referenced this pull request Sep 3, 2015
…message-if-was-set

Not set default required error message always
weierophinney added a commit to weierophinney/zend-inputfilter that referenced this pull request Sep 3, 2015
- `getMessages()` is expected to return the `NotEmpty::IS_EMPTY` message
  template.
@weierophinney
Copy link
Member

Closing in favor of #61.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants