mirror of https://github.com/portainer/portainer
10 lines
272 B
TypeScript
10 lines
272 B
TypeScript
|
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>;
|
||
|
}
|