|
@@ -14,7 +14,7 @@ class JSONValidator
|
|
|
*/
|
|
|
public static function validate($value, ExecutionContextInterface $context, $payload)
|
|
|
{
|
|
|
- if (isset($payload['field'])) {
|
|
|
+ if (isset($payload['field']) && $value) {
|
|
|
json_decode($value);
|
|
|
if (json_last_error() !== JSON_ERROR_NONE) {
|
|
|
$context->buildViolation('error.json_format_invalid')
|