$validate function on macos

The configuration setting Replace invalid NTFS characters at Preferences → General → Filenames might be what you're looking for.

If enabled, characters that are not allowed in Windows NTFS filenames are automatically replaced by an underscore _ on field lookup. The following characters are replaced: \ : / * ? < > | ".

Enabling the automatic replacement also prevents folder creation when using the converter Tag - Filename with fields that contain the forward slash character /.