1. The page names can accept any character except for `/`, backslash and
`:`. This is the validation that the server does now. This PR fixes the
regex that checks the page name to align with this.
2. When typing a character that's not allowed, we end up with a space at
the beginning or end of the page name, that doesn't really make sense,
and is confusing. Then we end up with trailing or leading spaces in the
page name, making the page name display look misaligned. This PR will
make it so that the disallowed characters just can't be typed, and just
don't make a difference in the page name.
3. We're also adding server-side validation for the icon slug.
[Slack
conversation](https://theappsmith.slack.com/archives/C03RPDB936Z/p1713161688607509).
/ok-to-test tags="@tag.Sanity"
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8746416301>
> Commit: 21e8d3a0060b9b4721b49149f307354b073332d7
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8746416301&attempt=1"
target="_blank">Click here!</a>
<!-- end of auto-generated comment: Cypress test results -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced page name validation to improve naming consistency across the
application.
- Updated validation for page icons and custom slugs to allow more
flexibility and ensure inputs meet new standards.
- **Bug Fixes**
- Fixed issues in page naming functions to prevent the use of certain
special characters and limit the length, enhancing data integrity and
user experience.
- **Tests**
- Added new tests to verify the handling of invalid and empty custom
slugs, ensuring robustness in page management functionalities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->