import * as Yup from "yup";

export const getInitialValues = (objectToEdit: any): any => {
  return {
    id: objectToEdit?.id ?? 0,
    name: objectToEdit?.name ?? "",
  };
};

export const getValidationSchema = () => {
  // validate input
  return Yup.object().shape({
    name: Yup.string().required("مطلوب"),
  });
};
