Json()
Validates if the given input is a valid JSON.
v::json()->assert('{"foo":"bar"}');
// Validation passes successfully| Mode | Template |
|---|---|
default |
{{subject}} must be a JSON string |
inverted |
{{subject}} must not be a JSON string |
| Placeholder | Description |
|---|---|
subject |
The validated input or the custom validator name (if specified). |
- Strings
| Version | Description |
|---|---|
| 3.0.0 | Templates changed |
| 0.3.9 | Created |