pathsValidator
Validates include/exclude path entries, reporting the first entry that is not a valid regular expression or glob.
An invalid entry does not throw when assigned to PathSettings — the whole list falls back to its default pattern instead — so this validator is what surfaces the problem to the user. The message names the entry and the reason it is invalid.
Import:
import { pathsValidator } from '@mnaoumov/obsidian-lib/path-settings';Signature:
function pathsValidator(paths: string[]): MaybeReturn<string>Parameters:
| Parameter | Type | Description |
|---|---|---|
paths |
string[] | The path entries to validate. |
Returns: MaybeReturn<string> — A message naming the first invalid entry, or nothing when every entry is valid.