Method: Shards::Workflow::Base#validate_regex
- Defined in:
- lib/shards/workflow/base.rb
#validate_regex(text, regex) ⇒ Object
156 157 158 159 160 |
# File 'lib/shards/workflow/base.rb', line 156 def validate_regex text, regex condition= text !~ /#{regex}/ wrong_text = "'%s' has a wrong format" % text validation condition, wrong_text end |