1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 06:49:40 +02:00

fix(app): fix env var state and validation [EE-6232] (#10941)

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2024-01-15 10:56:53 +13:00 committed by GitHub
parent 067a7d148f
commit 55f66f161e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View file

@ -45,15 +45,15 @@ export function EnvironmentVariablesFieldset({
export function envVarValidation(): SchemaOf<Values> {
return array(
object({
name: string().required('Name is required'),
name: string().required('Environment variable name is required'),
value: string().default(''),
needsDeletion: boolean().default(false),
})
).test(
'unique',
'This environment variable is already defined.',
'This environment variable is already defined',
buildUniquenessTest(
() => 'This environment variable is already defined.',
() => 'This environment variable is already defined',
'name'
)
);