mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 13:59:40 +02:00
11 lines
348 B
TypeScript
11 lines
348 B
TypeScript
import { object, boolean, string } from 'yup';
|
|
|
|
import { validation as nomadTokenValidation } from './NomadTokenField';
|
|
|
|
export function validationSchema(isNomadTokenVisible?: boolean) {
|
|
return object().shape({
|
|
allowSelfSignedCertificates: boolean(),
|
|
envVars: string(),
|
|
...(isNomadTokenVisible ? nomadTokenValidation() : {}),
|
|
});
|
|
}
|