Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[WIP] [InputFilter] Allow specification of error message via Factory #4116

Closed
wants to merge 282 commits into
from

Conversation

Projects
None yet
Contributor

davidwindell commented Mar 26, 2013

One might want to stop the 'Email' validator (for example) from returning all of the multiple errors about hostname, parts, etc. This is already supported by \Zend\InputFilter\Input via the setErrorMessage() method.

This PR simply adds the ability to specify this via the factory.

$this->add(array(
    'name' => 'email',
    'required' => false,
    'error_message' => 'This is not a valid email address',
    'validators' => array(
        array(
            'name' => 'EmailAddress',
        )
    )
));

ralphschindler and others added some commits Feb 15, 2013

@ralphschindler ralphschindler Forward #3791
Merge branch 'ThaDafinser-patch-3' into develop
dec8ec5
@ralphschindler ralphschindler Forward #3783 89f6b44
@ralphschindler ralphschindler Forward #3085 fcc0e52
@ralphschindler ralphschindler Forward #3777 430481d
@ralphschindler ralphschindler Forward #3749 9c7bfa3
@ralphschindler ralphschindler Forward #3784 dfbc5da
@blanchonvincent blanchonvincent Improve module manager to accept instance 0beadb0
@ralphschindler ralphschindler Forward #3813 a5f01b0
@weierophinney weierophinney Merge branch 'hotfix/3506' into develop
Forward port #3506
ddcd310
@ralphschindler ralphschindler Forward #3807 a7ab9ba
@weierophinney weierophinney Merge branch 'feature/context-aware-hydrator-strategies' of git://git…
…hub.com/stefankleff/zf2 into feature/3580
c13b736
@weierophinney weierophinney [#3580] Fix test failure
- $object was not being passed to closure that used it
61f084a
@weierophinney weierophinney Merge branch 'feature/3580' into develop
Close #3580
666ac8b
@ralphschindler ralphschindler Forward #3822
Merge branch '3axap4eHko-master' into develop
c815939
@ralphschindler ralphschindler Forward #3798
Merge branch 'gwis-remove-extra-semicolons' into develop
d159560
@weierophinney weierophinney Merge branch 'hotfix/3735' into develop
Forward port #3735
3d6d315
@ralphschindler ralphschindler Forward #3778
Merge branch 'weierophinney-hotfix/3711' into develop
0823436
@weierophinney weierophinney Merge branch 'hotfix/3742' into develop
Forward port #3742
1db2535
@ralphschindler ralphschindler Forward #3794
Merge branch 'DASPRiD-feature/query-fragment-assembling' into develop
7291a46
@weierophinney weierophinney Merge branch 'hotfix/3746' into develop
Forward port #3746
855b115
@weierophinney weierophinney Merge branch 'captureCache' of git://github.com/poisa/zf2 into featur…
…e/3747
42e7b7f
@weierophinney weierophinney Merge branch 'feature/3747' into develop
Close #3747
12e18cb
@weierophinney weierophinney Merge branch 'hotfix/3795' into develop
Forward port #3795
97213e9
@weierophinney weierophinney Merge branch 'hotfix/3765' into develop
Forward port #3765
132e127
@weierophinney weierophinney Merge branch 'hotfix/3764' into develop
Forward port #3764
bd9acc1
@weierophinney weierophinney Merge branch 'hotfix/3782' into develop
Forward port #3782
dd5550b
@weierophinney weierophinney Merge branch 'hotfix/3786' into develop
Forward port #3786
74b1979
@weierophinney weierophinney Merge branch 'hotfix/3789' into develop
Forward port #3789
2a3e782
@weierophinney weierophinney Merge branch 'options-attributes' of git://github.com/neilime/zf2 int…
…o hotfix/3792
594a466
@weierophinney weierophinney Merge branch 'hotfix/3792' into develop
Close #3792
6e27da7
@ralphschindler ralphschindler Forward #3707
Merge branch 'romulobusatto-fixture_postgresql_quotes' into develop
8cb221d
@weierophinney weierophinney Merge branch 'hotfix/3793' into develop
Forward port #3793
896a19b
@weierophinney weierophinney Merge branch 'hotfix/3797' into develop
Forward port #3797
01f3f48
@weierophinney weierophinney Merge branch 'hotfix/3803' into develop
Forward port #3803
10831d9
@weierophinney weierophinney Merge branch 'hotfix/3806' into develop
Forward port #3806
66a5b6c
@weierophinney weierophinney Merge branch 'hotfix/3808' into develop
Forward port #3808
438686c
@ralphschindler ralphschindler Forward #3733
Merge branch 'moura137-fix/SelectWhere' into develop
a5ff607
@ralphschindler ralphschindler Forward #3706
Merge branch 'romulobusatto-fixture_paginator' into develop
35f2b8a
@weierophinney weierophinney Merge branch 'hotfix/3819' into develop
Forward port #3819
9e6475b
@weierophinney weierophinney Merge branch 'hotfix/3785' into develop
Forward port #3785
3c422f3
@weierophinney weierophinney Merge branch 'hotfix/3817' into develop
Forward port #3817
17022b7
@weierophinney weierophinney Merge branch 'hotfix/captcha-failures' into develop
Fixes test issues due to timing issues in captcha GC
ff81764
@blanchonvincent blanchonvincent usage of associative array, Fix CS & add tests 1ae15b0
@weierophinney weierophinney Merge branch 'hotfix/3836' into develop
Forward port #3836
e00b52e
@weierophinney weierophinney Merge branch 'hotfix/3837' into develop
Forward port #3837
b185405
@weierophinney weierophinney Merge branch 'hotfix/3838' into develop
Forward port #3838
d5a82f2
@weierophinney weierophinney Merge branch 'hotfix/3828' into develop
Forward port #3828
ab2eb77
@weierophinney weierophinney Merge branch 'hotfix/3839' into develop
Forward port #3839
0efa2bd
@weierophinney weierophinney Merge branch 'releases/2.1.2' into develop
2.1.2 readiness
c75797e
@weierophinney weierophinney Merge branch 'version/bump' into develop
Bump version
46a8fda
@iquabius iquabius added new option to identical validator 89d40e3
@iquabius iquabius Fixed PHPDoc blocks 234fe74
@weierophinney weierophinney Merge branch 'hotfix/3855' into develop
Forward port #3855
b4fdf9d
@EvanDotPro EvanDotPro Merge commit 'refs/pull/3714/head' of github.com:zendframework/zf2 in…
…to develop

PR #3714
8ad9453
@weierophinney weierophinney Merge branch 'hotfix/3856' into develop
Forward port #3856
1bec164
@weierophinney weierophinney Merge branch 'releases/2.1.3' into develop
2.1.3 readiness

Conflicts:
	README.md
	library/Zend/Version/Version.php
a61c36f
@weierophinney weierophinney Merge branch 'version/bump' into develop
Conflicts:
	README.md
	library/Zend/Version/Version.php
717126b
@davidwindell davidwindell Updated docbloc 1f9de5d
@Maks3w Maks3w Forward port #3826 f9c8f14
@Maks3w Maks3w Forward port #3861 5c004f6

weierophinney and others added some commits Mar 12, 2013

@weierophinney weierophinney [#4011] CS fixes
- Replace tabs with spaces
- Remove unnecessary annotations
- Fix other CS/consistency issues as found
f3c0f33
@weierophinney weierophinney [#4011] CS fixes
- indentation, trailing spaces
0d7eb02
@weierophinney weierophinney Merge branch 'feature/4011' into develop
Close #4011
Fixes #3751
3b46ff0
@weierophinney weierophinney Merge branch 'hotfix/3987' into develop
Forward port #3987
e84e4e9
@weierophinney weierophinney Merge branch 'hotfix/3950' into develop
Forward port #3950
e799c31
@weierophinney weierophinney Merge branch 'hotfix/4010' into develop
Forward port #4010
3659323
@iquabius iquabius changed exception to type hinting 7bcd59a
@davidwindell davidwindell Further feedback a2a7712
@ralphschindler ralphschindler Port #3988 to develop
Merge branch 'Mech7-unit-test-preparestatement' into develop
b7a090a
@ralphschindler ralphschindler Forward Port #3957
Merge branch 'tux-rampage-hotfix/pdo-oci-platform' into develop
67aa813
@ralphschindler ralphschindler Forward Port #3921
Merge branch 'tux-rampage-hotfix/select-columns-with-table-alias' into develop
b81e1be
@weierophinney weierophinney Merge branch 'security/2.1.4' into develop
Conflicts:
	README.md
	library/Zend/Version/Version.php
fabc60d
@weierophinney weierophinney Merge branch 'version/bump' into develop
"merge" version bump from master

Conflicts:
	README.md
	library/Zend/Version/Version.php
4c2c6de
@francisdaigle francisdaigle Merged Source/Master dbfae36
@francisdaigle francisdaigle Merged Source/Master 5950a07
@francisdaigle francisdaigle Refactored ACL. Fixed tests. c701f88
@weierophinney weierophinney Merge branch 'hotfix/4026' into develop
Forward port #4026
c7b34ab
@weierophinney weierophinney Merge branch 'hotfix/mvc-query-notices' into develop
Fix test "failures" in MVC
809d58f
@francisdaigle francisdaigle Remove "nbproject" directory 14f3e80
@francisdaigle francisdaigle Refactored ACL. Fixed tests 09e2a44
@weierophinney weierophinney Merge branch 'hotfix/4027' into develop
Forward port #4027
cc0daf4
@weierophinney weierophinney Merge branch 'hotfix/4037' into develop
Forward port #4037
0433db6
@EvanDotPro EvanDotPro Merge branch 'hotfix/4031' into develop
Close #4031
2ed41e9
@DASPRiD DASPRiD Merge branch 'hotfix/4013' into develop
Forward port #4013
8103b37
Ryan Mauger Merge branch 'hotfix/4053' into develop
Close #4053

* hotfix/4053:
  Implement better text domain merging support
33da31d
@basz basz Removes convinience Date and Time classes. Adds internal reusable for…
…matter instance that invalidates when not changeable properties are changed within the DateTime Validator
d4267fd
@basz basz cs and api documentation e8bcdfd
@basz basz some more tests 7f75391
@basz basz review changes + dateFormat and timeFormat now dateType and timeType …
…which is more consistent with IntlDateFormatter
d4bfef2
@davidwindell davidwindell Added check for DateTime value 90b0456
@davidwindell davidwindell Update tests for Exception bef553b
@davidwindell davidwindell Implement feedback 744cab1
@davidwindell davidwindell Fix array_fill error 52c079a
@mwillbanks mwillbanks Merge branch 'hotfix/4085' into develop
Forward port #4085
b4b687f
@weierophinney weierophinney Merge pull request #3632 from davidwindell/zf3617
New DateTimeFormatter Filter (#3617)
cdfd752
@weierophinney weierophinney [#3632] throw previous exception
- Incorporate feedback from @marc-mabe
- Also: use $e as exception (for consistency)
794ab09
@weierophinney weierophinney Merge branch 'feature/3632' into develop
Close #3632
096bbb3
@weierophinney weierophinney Merge pull request #3693 from francisdaigle/develop
[WIP] Add RBAC support for navigation helper.
046adc6
@weierophinney weierophinney [#3693] CS fixes
- Docblock additions/edits
- Logic workflow
5920073
@weierophinney weierophinney [#3693] CS fixes
- trailing whitespace
- EOF endings
e5545d2
@weierophinney weierophinney Merge branch 'feature/3693' into develop
Close #3693
0a237e0
@weierophinney weierophinney Merge pull request #3844 from wryck7/fix-identical-validator
Added new option to fix a little issue originated from last PR

Conflicts:
	tests/ZendTest/Validator/IdenticalTest.php
b642d83
@Ocramius Ocramius Adding trait and tests for the aggregate listener detach logic ae2c013
@weierophinney weierophinney [#3844] Remove tests no longer present in develop
- Two tests were present on master but removed in develop -- and brought
  back in during merge. Removed.
a1512a7
@weierophinney weierophinney Merge branch 'feature/3844' into develop
Close #3844
9c848db
@weierophinney weierophinney Merge pull request #3879 from davidwindell/feature-collection-input-f…
…ilter

Feature CollectionInputFilter
b88d191
@weierophinney weierophinney Merge branch 'feature/3879' into develop
Close #3879
7bee01c
@weierophinney weierophinney Merge pull request #3969 from basz/feature/i18n-date-validator
Stab at localized date validation
c5e034d
@Ocramius Ocramius Reverting the naming from 'callbacks' to 'listeners' for callback han…
…dlers in aggregates
311c8a7
@weierophinney weierophinney [#3969] Remove global qualifier
- Class was already imported
6f5d790
@weierophinney weierophinney [#3969] CS fixes
- trailing whitespace
d9e51f9
@weierophinney weierophinney Merge branch 'feature/3969' into develop
Close #3969
0368f3d
@weierophinney weierophinney Merge branch 'hotfix/3983' into develop
Forward port #3983
d665ce5
@weierophinney weierophinney Merge pull request #3876 from Ocramius/feature/abstract-aggregate-lis…
…tener

Implementing and re-utilizing an abstract aggregate listener
127bef9
@weierophinney weierophinney [#3876] CS fixes
- EOF ending
182ea60
@weierophinney weierophinney Merge branch 'feature/3876' into develop
Close #3876
fcae124
@weierophinney weierophinney Fix failing unit tests
- Addition of #3893 into develop broke test assumptions in #3879
  Basically, an empty string indicates a value was passed;
  one input, while it was marked as not required, was not marked as
  allow empty, and thus a validator that checked for string length
  failed. Changing the input to allow empty made the tests pass again.
- The question is: if a value is not marked as required, but has an
  empty string passed, should we pass it to the validator?
e6801de
@weierophinney weierophinney Fix failing tests in Zend\InputFilter
- Cleaned up BaseInputFilterTest to use a data provider; makes isolating failing
  cases simpler.
- Rewrote logic in validateInputs() to capture discrete use cases; more verbose,
  but easier to determine what is happening.
- Made executive decision: non-required input that is empty is valid.
b11af3f
@davidwindell davidwindell Specify input error_message via factory e06fbfc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment