1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 05:49:40 +02:00
portainer/app/react/edge/components/EdgeScriptForm/EdgeScriptForm.validation.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
412 B
TypeScript
Raw Normal View History

import { object, boolean, string } from 'yup';
export function validationSchema() {
return object().shape({
allowSelfSignedCertificates: boolean(),
envVars: string(),
edgeIdGenerator: string()
.required('Edge ID Generator is required')
.test(
'valid edge id generator',
'edge id generator cannot be empty',
(value) => !!(value && value.length)
),
});
}