improve logic for validations rules for weight and set