{ value: 'R', label: 'Reward Points' }, ]; //discountlabelType and cashbacklabelType are used to get the data from dropdown const discountlabelType = [ { value: '--Please Select--', label: '--Please Select--' }, { value: 'UPTO', label: 'UPTO' }, { value: 'FLAT', label: 'FLAT' }, ]; const cashbacklabelType = [ { value: '--Please Select--', label: '--Please Select--' }, { value: 'UPTO', label: 'UPTO' }, { value: 'FLAT', label: 'FLAT' }, const [disclabelDropDown, setdisclabelDropDown] = useState(""); const [cashbacklabelDropDown, setcashbacklabelDropDown] = useState(""); Discount_Label: '', Cashback_Label: '' } else if (ESI_Cashback_Type == "R") { return schema.matches(/^\d+(\.\d{1,2})?$/, "ESI Cashback Reward Points must be numeric.").min(1, "ESI Cashback Reward Points must be at least 1.").max(100, "ESI Cashback Reward Points must be <= 100.").required('ESI Cashback Reward Points are required.'); {/* Discount Label field with validation*/} Discount Label { props.setFieldValue('Discount_Label', item.value) setdisclabelDropDown(false); }} /> {/* ESI Cashback Type Field with Validation */} {/* ESI_Cashback_Amount Field with Validation */} {/* Cashback Label field with validation*/} Cashback Label { props.setFieldValue('Cashback_Label', item.value) setcashbacklabelDropDown(false); }} /> ////add couponm config info Discount_Label: data.Discount_Label, Cashback_Label: data.Cashback_Label, /////products////// }, { value: 'R', label: 'Reward Points' }, //discountlabelType and cashbacklabelType are used to get the data from dropdown const discountlabelType = [ { value: '--Please Select--', label: '--Please Select--' }, { value: 'UPTO', label: 'UPTO' }, { value: 'FLAT', label: 'FLAT' }, ]; const cashbacklabelType = [ { value: '--Please Select--', label: '--Please Select--' }, { value: 'UPTO', label: 'UPTO' }, { value: 'FLAT', label: 'FLAT' }, ]; const [disclabelDropDown, setdisclabelDropDown] = React.useState(''); const [cashbacklabelDropDown, setcashbacklabelDropDown] = React.useState(''); Discount_Label: '', Cashback_Label: '' Discount Label { props.setFieldValue('Discount_Label', item.value) setdisclabelDropDown(false); }} /> {props.touched.Discount_Label && props.errors.Discount_Label} Cashback Label { props.setFieldValue('Cashback_Label', item.value) setcashbacklabelDropDown(false); }} /> {props.touched.Cashback_Label && props.errors.Cashback_Label} Discount_Label: productpartner.Discount_Label, Cashback_Label: productpartner.Cashback_Label, edit product//// Discount_Label: productpartner.Discount_Label, Cashback_Label: productpartner.Cashback_Label,