zfcampus/zf-content-validation — pull request #20 by weierophinney (2014-07-23 22:10:27+00:00)
Title: Bug: Validation bypassed when POST is empty

I have a validator set up for one of my resources. `label` is a required field, `street` is optional. However, when I send an empty POST request, it completely ignores my validation rules, and passes the request to the controller. I end up with an MySQL error `Integrity constraint violation: 1048 Column 'label' cannot be null`

```
'Api\\V1\\Rest\\Address\\Validator' => array(
array(
'name' => 'street',
'required' => false,
'filters' => array(),
'validators' => array(
0 => array(
'name' => 'Application\\Validator\\Text',
'options' => array(
'multiline' => false
),
),
),
'description' => 'street name',
'allow_empty' => true,
'continue_if_empty' => true,
),
array(
'name' => 'label',
'required' => true,
'filters' => array(),
'validators' => array(
array(
'name' => 'Application\\Validator\\Text',
'options' => array(
'multiline' => false
),
),
),
'allow_empty' => false,
'continue_if_empty' => false,
)
)
```

With httpie:
`http POST http://localhost/address`