BIDS spec vs. bids-validator: func file naming

The stable version of the BIDS spec indicates that functional data filenames [0] should be able to include a dir-<label> element, but the current bids-validator (v 1.1.2) regular expressions don’t cover this case:

# bids-validator/bids_validator/rules/file_level_rules.json, line 136

  "func": {
    "regexp": "^\\/(sub-[a-zA-Z0-9]+)\\/(?:(ses-[a-zA-Z0-9]+)\\/)?func\\/\\1(_\\2)?_task-[a-zA-Z0-9]+(?:_acq-[a-zA-Z0-9]+)?(?:_rec-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?(?:_echo-[0-9]+)?(?:@@@_func_ext_@@@)$",
    "tokens": {
      "@@@_func_ext_@@@": [

Is the spec changing, or is bids-validator not up-to-date? I’d be happy to generate a pull request, but I wanted to check first.


Yes - please send a PR. Thank you!

1 Like

All set: