1 import { type FormikErrors } from 'formik';
2 import { c } from 'ttag';
4 import type { VaultFormValues } from '@proton/pass/types';
5 import { isEmptyString } from '@proton/pass/utils/string/is-empty-string';
7 export const validateVaultValues = ({ name }: VaultFormValues) => {
8 let errors: FormikErrors<VaultFormValues> = {};
9 if (isEmptyString(name)) {
10 errors.name = c('Warning').t`Vault name is required`;