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:
parent
067a7d148f
commit
55f66f161e
3 changed files with 8 additions and 7 deletions
|
@ -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'
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue