Frontend: Add a helpful validation message when masked variable value matches the name of an existing variable
Release notes
Problem to solve
When creating a new project or group variable, masked variables value can't match the name of an existing variable.
We show the same generic error that is unhelpful in resolving the problem.
The error just says This variable can't be masked
, and doesn't explain why.
Proposal
When
- When the value entered for a potential masked variable matches the name of an existing variable, show :
Value cannot match the name of an existing predefined or custom CI/CD variable.
- For all other error in the masked variable value field show:
This variable can't be masked
.
Implementation guide
backend
We need to look into what's happening while the validations are being ran
To customize the error, we can use message attribute from ActiveRecord
.
Intended users
Feature Usage Metrics
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.