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

InputFilter does not validate empty values #2558

Closed
zfbot opened this issue Sep 28, 2012 · 1 comment
Closed

InputFilter does not validate empty values #2558

zfbot opened this issue Sep 28, 2012 · 1 comment
Assignees

Comments

@zfbot
Copy link

zfbot commented Sep 28, 2012

Jira Information

Original Issue:ZF2-523
Issue Type:Improvement
Reporter:Oliver Leisalu
Created:09/05/12
Assignee:weierophinney
Components:Zend\InputFilter

Description

It is impossible to make a validator for case when value can be empty depending on other values.

For example, if some checkbox is checked, then empty value is allowed. If checkbox is not checked, empty value is not allowed.

checkbox name: doesNotHaveOwner (I understand that using negative is bad, but our case needs this behaviour)
input name: ownerName

if doesNotHaveOwner == 0, then ownerName is mandatory (As both are empty, then no validator is invoked)
if doesNotHaveOwner == 1, then ownerName can be empty.

@zfbot
Copy link
Author

zfbot commented Sep 28, 2012

This issue was ported from the ZF2 Jira Issue Tracker at
http://framework.zend.com/issues/browse/ZF2-523

Known GitHub users mentioned in the original message or comment:
@weierophinney

@ghost ghost assigned padraic Feb 2, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants