Validate export prefix format on offline transfer configuration

What does this MR do and why?

The export_prefix on Import::Offline::Configuration is set by the user when they start an offline transfer import, and it goes straight into object storage keys through Import::Offline::ObjectKeyBuilder. Today it only has a presence check. This MR adds a format validation so the prefix can only hold letters, numbers, dashes, and underscores, which matches the format GitLab generates for exports (for example 2026-03-25_18-17-27_export_4B2u4G61). Values with ., /, spaces, or other special characters are now rejected.

Closes #597501.

Screenshots or screen recordings

Not applicable — backend change.

How to set up and validate locally

  1. Run bundle exec rspec spec/models/import/offline/configuration_spec.rb.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

This contribution was prepared with the help of an AI assistant. I reviewed the changes and take responsibility for them.

Merge request reports

Loading
Loading