mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 23:59:51 +01:00
945 B
945 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 |
{{subject}} must be a valid JSON string |
inverted |
{{subject}} must not be a valid JSON string |
Template placeholders
| Placeholder | Description |
|---|---|
subject |
The validated input or the custom validator name (if specified). |
Categorization
- Strings
Changelog
| Version | Description |
|---|---|
| 0.3.9 | Created |
See also: