Skip to content

the expected error on the missing book title does not appear #1336

@CedCannes

Description

@CedCannes

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."
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions