Skip to content

Draft: validate prefix instead of filename and stricter regexp#2038

Closed
epanepucci wants to merge 1 commit intomxcube:developfrom
epanepucci:ehp-validate-prefix-instead
Closed

Draft: validate prefix instead of filename and stricter regexp#2038
epanepucci wants to merge 1 commit intomxcube:developfrom
epanepucci:ehp-validate-prefix-instead

Conversation

@epanepucci
Copy link
Member

  • the current validation regexp allows characters that are not UNIX friendly because it validates against the filename prop that is used to indicate the template of the filenames that will be generated:

DataCollection.jsx +370

  if (state.taskForm.sampleID) {
    fname = state.taskForm.taskData.parameters.fileName;
  } else {
    const prefix = selector(state, 'prefix');
    fname = `${prefix}_[RUN#]_[IMG#]`;
  }
  • this simplified regexp validates only against valid UNIX characters except the 'dot' character

  • it also validates the prefix prop which is editable by the user instead of the filename

- the current validation regexp allows characters that are not UNIX
  friendly because it validates against the filename prop that is used
  to indicate the *template* of the filenames that will be generated

- this simplified regexp validates only against valid UNIX characters
  except the 'dot' character

- it also validates the prefix prop which is editable by the user
@epanepucci epanepucci changed the title validate prefix instead of filename and stricter regexp Draft: validate prefix instead of filename and stricter regexp Mar 4, 2026
@epanepucci epanepucci closed this Mar 4, 2026
@marcus-oscarsson
Copy link
Member

It seems like a reasonable fix, why did you close it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants