Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

edwinjansen's avatar

Extra layer Validationmessages?

When my validation fails I receive errors like:

  "errors": {
    "source.url": [
      "The title must be at least 3 characters."
    ]
  }

Why is "source.url" within "errors" an array? I never get another result then an array with one item. Even not when other rules are failing.

return ["errors"=> $_validator->messages()]

validation rules:

['required','min:3','max:255','active_url']
0 likes
0 replies

Please or to participate in this conversation.