1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +02:00
portainer/app/react/docker/containers/CreateView/RestartPolicyTab/validation.ts

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

10 lines
272 B
TypeScript
Raw Normal View History

import { mixed, SchemaOf } from 'yup';
import { RestartPolicy } from './types';
export function validation(): SchemaOf<RestartPolicy> {
return mixed<RestartPolicy>()
.oneOf(Object.values(RestartPolicy))
.default(RestartPolicy.No) as SchemaOf<RestartPolicy>;
}