neos / neos/redirecthandler-ui
Streamlining Regex Validation in Neos Redirect Handler UI
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Neos currently uses separate regular expressions for validating source and target URIs in the Redirect Handler UI. These validations exist in two distinct configurations: Neos:RedirectHandler:validation and Neos:RedirectHandler:Ui:validation. This redundancy leads to:
- Increased maintenance overhead: Maintaining consistent regex patterns across two locations is time-consuming and prone to errors.
- Potential inconsistencies: Mismatches between the PHP and JavaScript validations can cause unexpected behavior.
We propose a centralized validation approach to simplify the process and improve consistency. This involves:
- Server-side validation: Implement a new endpoint that accepts source and target URIs as parameters.
- Unified regex engine: This endpoint will utilize a single, unified set of regex patterns for validation on the server-side.
- Client-side validation integration: Refactor the JavaScript code of the Redirect Handler UI to leverage the new server-side validation endpoint. Upon user input, an asynchronous request will be sent to the server for validation.
https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Redirect Handler UI validation code and the Neos:RedirectHandler:validation and Neos.RedirectHandler:Ui:validation configurations. Then inspect existing endpoint conventions before deciding how server-side validation should accept source and target URIs. Done means one server-side validation path is used by the UI and the duplicate regular expressions no longer cause inconsistencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, typescript
- Domain
- api, full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100