Comments (3)
Can you show the full input-filter configuration? I am almost certain the problem lies somewhere else. If this is really a bug then it should be reported at the correct repository: zendframework/zend-inputfilter.
Originally posted by @Wilt at zfcampus/zf-content-validation#90 (comment)
from api-tools-content-validation.
0 => [
'required' => false,
'validators' => [],
'filters' => [],
'name' => 'debug',
'description' => 'Output debug information.',
],
Here it is.
Originally posted by @tasselchof at zfcampus/zf-content-validation#90 (comment)
from api-tools-content-validation.
I have the exact same problem with an identical setup. If you pass boolean true then it's fine. If you don't set the element at all, it's fine (not required after all). But boolean false always triggers {"isEmpty":"Value is required and can't be empty"}. Seems the easiest way around this is to add 'allow_empty' => true to your configuration and condition your data accordingly at the other end. Probably just assume if it aint a boolean true then it's false.
Originally posted by @Bombdog at zfcampus/zf-content-validation#90 (comment)
from api-tools-content-validation.
Related Issues (12)
- Some non corresponding between 'zf-content-validation' and 'zf-rest' HOT 1
- Psalm integration
- PHP 8.0 support
- Switch to GHA CI workflow
- [RFC]: Allow custom CollectionInputFilter in ContentValidationListener
- PATCH request to collection endpoint with empty body causes RuntimeException
- Suggestion for improvement regarding entity/collection handling in next major release HOT 1
- DELETE method can not have an input_filter HOT 3
- Unexpected behavior with "use_raw_data"
- Validator with Zend\I18n\Validator\DateTime is always required HOT 1
- Filters throw uncaught exceptions and return improper response code
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-tools-content-validation.