Code Review
/
packages
/
precise
/
mcollective.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Updated mcollective.init according to OSCI-658
[packages/precise/mcollective.git]
/
plugins
/
mcollective
/
validator
/
regex_validator.rb
diff --git a/plugins/mcollective/validator/regex_validator.rb
b/plugins/mcollective/validator/regex_validator.rb
new file mode 100644
(file)
index 0000000..
3d21ec6
--- /dev/null
+++ b/
plugins/mcollective/validator/regex_validator.rb
@@ -0,0
+1,9
@@
+module MCollective
+ module Validator
+ class RegexValidator
+ def self.validate(validator, regex)
+ raise ValidatorError, "value should match #{regex}" unless validator.match(regex)
+ end
+ end
+ end
+end