docs icon indicating copy to clipboard operation
docs copied to clipboard

the expected error on the missing book title does not appear

Open CedCannes opened this issue 4 years ago • 0 comments

Hi, I followed the how to and I have an unexpected result in docs/distribution/index.md L629 Oops, we forgot to add the title. Submit the request anyway, you should get a 500 error with the following message:

This error does not appear because the title field is initialized to '' and not to null.

/** The title of this book. */
    public string $title = '';

In addition the documentation proposes to add a validator to prevent the error from happening again but doesn't add one to the title field mentioned above but expects the following exception to appear:

{
      "propertyPath": "title",
      "message": "This value should not be blank."
    }

CedCannes avatar Apr 03 '21 23:04 CedCannes