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
I've seen #10 and the work which has been done in former zendframework package.
I am not sure if @Maks3w is still working on this but I'd like to propose some kind of NotEmptyValidatorImplementedInterface, which tells the \Laminas\InputFilter\Inputobject, that it does not have to add the NotEmpty validator to the ValidatorChain.
Even tho this feature is deprecated and with v3 of this package it would've been necessary to add the NotEmpty validator manually, I have to work with the current implementation and this implementation does not allow me to handle NotEmpty by myself.
So - why do I need this?
We want to keep things simple and specify own validators for all Form Elements.
So in case, one Element needs more than one validator, we just implement that validator as some kind of chain.
This gives us the flexibility of re-using that validator in multiple forms and we could specify dedicated NotEmpty messages for each element (without having to use the existing annotation/logic - I know that there is such a thing ;-) ).
So, in the current implementation, the NotEmpty validator kicks in when the field is empty. But we want to specify own error messages for the NotEmpty validation and we dont want to use the existing Annotation (we are using Annotations) as that would require unreadable annotation specs and further more - when re-using validators we have to copy & paste that to all other implementations.
What would be the next steps?
I'd like to create a PR (or probably a colleague) which provides the new interface NotEmptyValidatorImplementedInterface.
Feature Request
Summary
Hey there,
I've seen #10 and the work which has been done in former zendframework package.
I am not sure if @Maks3w is still working on this but I'd like to propose some kind of
NotEmptyValidatorImplementedInterface
, which tells the\Laminas\InputFilter\Input
object, that it does not have to add theNotEmpty
validator to theValidatorChain
.Even tho this feature is deprecated and with v3 of this package it would've been necessary to add the
NotEmpty
validator manually, I have to work with the current implementation and this implementation does not allow me to handleNotEmpty
by myself.So - why do I need this?
We want to keep things simple and specify own validators for all Form Elements.
So in case, one Element needs more than one validator, we just implement that validator as some kind of chain.
This gives us the flexibility of re-using that validator in multiple forms and we could specify dedicated
NotEmpty
messages for each element (without having to use the existing annotation/logic - I know that there is such a thing ;-) ).So, in the current implementation, the
NotEmpty
validator kicks in when the field is empty. But we want to specify own error messages for theNotEmpty
validation and we dont want to use the existing Annotation (we are using Annotations) as that would require unreadable annotation specs and further more - when re-using validators we have to copy & paste that to all other implementations.What would be the next steps?
NotEmptyValidatorImplementedInterface
.NotEmpty
manually.NotEmptyValidatorImplementedInterface
as deprecated in the initial implementationAny vetos here?
The text was updated successfully, but these errors were encountered: