Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: yup__WEBPACK_IMPORTED_MODULE_4__.string(...).phone is not a function #333

Closed
A4TIF opened this issue Aug 30, 2020 · 1 comment

Comments

@A4TIF
Copy link

A4TIF commented Aug 30, 2020

In registration page, I'm using:

import * as Yup from "yup";
import "yup-phone";

Then setting RegistrationSchema as follows:

const RegistrationSchema = Yup.object().shape({
    first_name: Yup.string()
      .required(),
    last_name: Yup.string()
      .required(),
    email: Yup.string()
      .email("Wrong email format")
      .required(),
    phone: Yup.string()
      .phone()
      .required()
  });

But getting this error:

TypeError: yup__WEBPACK_IMPORTED_MODULE_4__.string(...).phone is not a function

I'm working on a new admin theme and fairly new to this. Kindly advice.

Thanks

EDIT: Nevermind, the new version 1.2.4 resolved it 👍

@Ihtisham-Khattak
Copy link

Ihtisham-Khattak commented Dec 6, 2022

The same problem affects me as well. Is this problem connected to the Yup version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants