title: Response "',' is an invalid start of a value. Path: $. in Asp.Net Core API
body: <p>I am developing API in Asp.Net Core 3.1, I have a POST method below (content type is <code>application/JSON</code>), I am passing an invalid JSON to the response deliberately and response is also very clear. But here my question is can I make changes to return the response like</p>
  <blockquote>
  <p>countryId is a required field</p>
  </blockquote>
  <p>for this particular case. Please let me know if it can be done, otherwise, I am fine with this response also(because this response is also valid firs to check the content type is a valid JSON or not).</p>
  <p><strong>Method:</strong></p>
  <pre><code>public ActionResult ValidateFields(ValidateFieldsRequest validateFieldsRequest)
          {
  </code></pre>
  <p><strong>Request class:</strong></p>
  <pre><code>public class ValidateFieldsRequest
  {
      //string currencyCode, int countryId, string fieldName, string fieldValue
  
      [Required]
      public string currencyCode { get; set; }
      [Required]
      [RegularExpression(&quot;^[1-9]\\d*$&quot;, ErrorMessage = &quot;Invalid fieldName.&quot;)]
      public int countryId { get; set; }
      [Required]
      [MinLength(1, ErrorMessage = &quot;At least one field required&quot;)]
      public List&lt;Field&gt; fields { get; set; }
  
  }
  </code></pre>
  <p><strong>Request:</strong></p>
  <pre><code>{
      &quot;currencyCode&quot;: &quot;RUB&quot;,
      &quot;countryId&quot;: ,
      &quot;fields&quot;: [{
              &quot;fieldName&quot;: &quot;BIC or Bank Code&quot;,
              &quot;fieldValue&quot;: &quot;12345678901234567&quot;
          },
          {
              &quot;fieldName&quot;: &quot;Beneficiary Account Number&quot;,
              &quot;fieldValue&quot;: &quot;123456&quot;
          }
      ]
  }
  </code></pre>
  <p><strong>Response:</strong></p>
  <pre><code>{
      &quot;type&quot;: &quot;https://tools.ietf.org/html/rfc7231#section-6.5.1&quot;,
      &quot;title&quot;: &quot;One or more validation errors occurred.&quot;,
      &quot;status&quot;: 400,
      &quot;traceId&quot;: &quot;|6a64d7ad-495850db788356cd.&quot;,
      &quot;errors&quot;: {
          &quot;$.countryId&quot;: [
              &quot;',' is an invalid start of a value. Path: $.countryId | LineNumber: 2 | BytePositionInLine: 28.&quot;
          ]
      }
  }
  </code></pre>