refactor. added a test for $validatorProvider.convertValidator(RegExp).