Raise a validation error for invalid RegExp in regex condition. Fix #36.