yup#ref TypeScript Examples

The following examples show how to use yup#ref. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SignUpForm.tsx    From End-to-End-Web-Testing-with-Cypress with MIT License 6 votes vote down vote up
validationSchema = object({
  firstName: string().required("First Name is required"),
  lastName: string().required("Last Name is required"),
  username: string().required("Username is required"),
  password: string()
    .min(4, "Password must contain at least 4 characters")
    .required("Enter your password"),
  confirmPassword: string()
    .required("Confirm your password")
    .oneOf([ref("password")], "Password does not match"),
})
Example #2
Source File: schema.ts    From tailchat with GNU General Public License v3.0 5 votes vote down vote up
fieldSchema = {
  string,
  ref,
}