required field minPurchaseQuantity and maxPurchaseQuantity
deploy to danak / build_and_deploy (push) Has been cancelled
deploy to danak / build_and_deploy (push) Has been cancelled
This commit is contained in:
@@ -56,9 +56,9 @@ const CreateProduct: FC = () => {
|
|||||||
paymentType: Yup.string().required(),
|
paymentType: Yup.string().required(),
|
||||||
minPurchaseQuantity: Yup.number().when("pricingType", {
|
minPurchaseQuantity: Yup.number().when("pricingType", {
|
||||||
is: PricingType.VARIABLE,
|
is: PricingType.VARIABLE,
|
||||||
then: (schema) => schema.min(0, "حداقل مقدار باید مثبت باشد"),
|
then: (schema) => schema.required("حداقل مقدار الزامی است").positive("حداقل مقدار باید مثبت باشد"),
|
||||||
}),
|
}),
|
||||||
maxPurchaseQuantity: Yup.number().min(0, "حداکثر مقدار باید مثبت باشد"),
|
maxPurchaseQuantity: Yup.number().required("حداکثر مقدار الزامی است").positive("حداکثر مقدار باید مثبت باشد"),
|
||||||
purchasePitch: Yup.number().when("pricingType", {
|
purchasePitch: Yup.number().when("pricingType", {
|
||||||
is: PricingType.VARIABLE,
|
is: PricingType.VARIABLE,
|
||||||
then: (schema) => schema.min(0, "گام تغییر باید مثبت باشد"),
|
then: (schema) => schema.min(0, "گام تغییر باید مثبت باشد"),
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ const UpdateProduct: FC = () => {
|
|||||||
paymentType: Yup.string().required(),
|
paymentType: Yup.string().required(),
|
||||||
minPurchaseQuantity: Yup.number().when("pricingType", {
|
minPurchaseQuantity: Yup.number().when("pricingType", {
|
||||||
is: PricingType.VARIABLE,
|
is: PricingType.VARIABLE,
|
||||||
then: (schema) => schema.min(0, "حداقل مقدار باید مثبت باشد"),
|
then: (schema) => schema.required("حداقل مقدار الزامی است").positive("حداقل مقدار باید مثبت باشد"),
|
||||||
}),
|
}),
|
||||||
maxPurchaseQuantity: Yup.number().min(0, "حداکثر مقدار باید مثبت باشد"),
|
maxPurchaseQuantity: Yup.number().required("حداکثر مقدار الزامی است").positive("حداکثر مقدار باید مثبت باشد"),
|
||||||
purchasePitch: Yup.number().when("pricingType", {
|
purchasePitch: Yup.number().when("pricingType", {
|
||||||
is: PricingType.VARIABLE,
|
is: PricingType.VARIABLE,
|
||||||
then: (schema) => schema.min(0, "گام تغییر باید مثبت باشد"),
|
then: (schema) => schema.min(0, "گام تغییر باید مثبت باشد"),
|
||||||
|
|||||||
Reference in New Issue
Block a user