Completing the functionalization of the login page

This commit is contained in:
Alihaghighattalab
2024-08-05 17:44:52 +03:30
parent a581dcce7e
commit ba0f7cd71a
7 changed files with 143 additions and 12 deletions
+12
View File
@@ -0,0 +1,12 @@
import * as yup from 'yup'
export const loginSchema = yup.object({
phoneNumber: yup.string()
.required("وارد کردن شماره تماس الزامی میباشد")
.min(11, "شماره تماس نمیتوند کمتر از 11 رقم باشد")
.max(11, "شماره تماس نمیتواند بیشتر از 11 رقم باشد")
.matches(/^[0-9]{11}$/, "شماره تماس نامعتبر"),
password: yup.string()
.required("وارد کردن رمزعبور الزامی میباشد")
.min(8, "رمزعبور نمیتواند کمتر از 8 کاراکتر باشد")
})