Question: Here is the json data I send through postman for 'specification' field:

```
{
"specification": [
    {
      "type": [
          {
              "type": "Smartphone , Phablet , Notch Phone , Camera Phone , Selfie Phone",
              "shape": "Bar"
          }
      ],
      "basic": [
          {
              "os": "Smartphone , Phablet , Notch Phone , Camera Phone , Selfie Phone",
              "Sim": "Bar"
          }
      ]
    }
  ]
}

```

Then in controller the validation rule is:

```
'specification' => 'required|json'

```

The error message: "The specification must be a valid JSON string."

how can I send and check valid json in laravel controller?

Answer: 
From [documentation](https://laravel.com/docs/5.7/validation#rule-json):

> 
> **json**
> 
> 
> The field under validation must be a valid *JSON string*.
> 
> 
> 

Your data has been parsed from JSON by Laravel itself, and `specification` is an *array* already, not a JSON *string*. You can check that by changing your rule to `required|array` and you'll see that it passes.
The string you are posting here is not a valid json string. A valid json string starts and ends with `{` and `}`. So in your case it should be like this:

```
{
    "specification": [{
        "type": [{
            "type": "Smartphone , Phablet , Notch Phone , Camera Phone , Selfie Phone",
            "shape": "Bar"
        }],
        "basic": [{
            "os": "Smartphone , Phablet , Notch Phone , Camera Phone , Selfie Phone",
            "Sim": "Bar"
        }]
    }]
}

```