Fixes #283 issue with regexp not escaping on validation