create a schema and validate on the bases of a key (isEdit:booelan)
feild1:Yup.number().when('isEdit',{is:true,then:Yup.number().otherconditions}
so what will happen here is it will only check this field1 when isEdit is true