Show error when user attempts to create wiki page with empty title

What does this MR do and why?

If the wiki title is empty or only whitepsace, do not allow the user to create or save the page.

References

Screenshots or screen recordings

Before After
gdk.test_3000_flightjs_Flight_-wikis_8bb4cdb6-27b5-4f42-af02-4180cc5a1770_random_title_true_view_create__2 gdk.test_3000_flightjs_Flight_-_wikis_8bb4cdb6-27b5-4f42-af02-4180cc5a1770_random_title_true_view_create
gdk.test_3000_flightjs_Flight_-_wikis gdk.test_3000_flightjs_Flight_-wikis_8bb4cdb6-27b5-4f42-af02-4180cc5a1770_random_title_true_view_create__1

How to set up and validate locally

  1. Check out this branch
  2. Visit the Wiki
  3. Create a new page or edit an existing one
  4. Clear the page title field
  5. Attempt to submit the form
  6. You will see an invalid/error message on the title field saying it is required
  7. Edit the title to be only whitespace
  8. Attempt to submit the form
  9. You will see an invalid/error message on the title field saying it is required
  10. Edit the title to have non-whitespace characters in it
  11. Attempt to submit the form
  12. You will successfully submit the form

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #497418 (closed)

Merge request reports

Loading