Module: Quby::Compiler::DSL::Questions::RegexpValidations
- Included in:
- StringQuestionBuilder, TextQuestionBuilder
- Defined in:
- lib/quby/compiler/dsl/questions/base.rb
Instance Method Summary collapse
Instance Method Details
#validates_format_with(regexp, options = {}) ⇒ Object
54 55 56 57 |
# File 'lib/quby/compiler/dsl/questions/base.rb', line 54 def validates_format_with(regexp, = {}) @question.validations ||= [] @question.validations << {type: :regexp, matcher: regexp}.reverse_merge() end |