allowing a RegExp as a custom check