Skip to content

IBX-10375 - Fix validator names being mangled in production builds #1655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ryanolee
Copy link

N.b there is no v5 stable branch so opening this into main

🎫 Issue IBX-10375

What

This PR intruduces a new method to eZ validators called "getValidatorName" which returns a reliable stable refernce to the name of the given validator. This PR also updates to references where the validator names are pulled.

Why

In production mode only references to the validator.constructor.name are mangled into random letters.

image

In eZ 3.3 decisions about what errors to show in the page builder are predicated on the field-set these validator names rely on.

How

By moving to a hard coded string the minified JS does not effect the names of validators as given.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
13.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants