2. Create a new author
Zoom
Create a form where users can add a new author by providing the author's name and bio.
The form must also allow users to select multiple books from a list of books to assign to the new
author.
Validation Requirement: Both the Name and Bio fields are required and must not be empty. If either field is left empty, the user must receive a validation error.
Use the POST/api/authors API to create the new author.
URL: /Authors/Create
After the user submits the form
If the author is created successfully, redirect the user back to the author list page (/Authors) to show the newly added author.
If validation fails (e.g., Name or Bio is empty), appropriate error messages are displayed.
If there is an error during author creation, display a failure message indicating the issue,such as "Error creating author."
+ 100%
Close