respect-validation/docs/rules/Json.md
2024-12-09 01:34:50 +01:00

932 B

Json

  • Json()

Validates if the given input is a valid JSON.

v::json()->isValid('{"foo":"bar"}'); // true

Templates

Json::TEMPLATE_STANDARD

Mode Template
default {{name}} must be a valid JSON string
inverted {{name}} must not be a valid JSON string

Template placeholders

Placeholder Description
name The validated input or the custom validator name (if specified).

Categorization

  • Strings

Changelog

Version Description
0.3.9 Created

See also: