code: def workflow_before_validate(self):
          
          # Re-set the errors on this ARImport each time validation is attempted.
          # When errors are detected they are immediately appended to this field.
          self.setErrors([])
  
          self.validate_headers()
          self.validate_samples()
  
          if self.getErrors():
              addStatusMessage(self.REQUEST, _p('Validation errors.'), 'error')
              transaction.commit()
              self.REQUEST.response.write(
                  '<script>document.location.href="%s/edit"</script>' % (
                      self.absolute_url()))
          self.REQUEST.response.write(
              '<script>document.location.href="%s/view"</script>' % (
                  self.absolute_url()))
docs: This function transposes values from the provided file into the
          ARImport object's fields, and checks for invalid values.
  
          If errors are found:
              - Validation transition is aborted.
              - Errors are stored on object and displayed to user.