-
Notifications
You must be signed in to change notification settings - Fork 2
DataFormat
Pieter Hordijk edited this page Dec 30, 2018
·
1 revision
Validates the input (string) to be a valid JSON string.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\DataFormat\Json;
(new Json())->validate('{"foo":"bar"}');-
Type.Stringwhen the validated value is not a string -
DataFormat.Jsonwhen the validated value is not a valid JSON string