Class: HasDynamicColumns::DynamicColumnValidation
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- HasDynamicColumns::DynamicColumnValidation
- Defined in:
- lib/has_dynamic_columns/dynamic_column_validation.rb
Instance Method Summary collapse
Instance Method Details
#is_valid?(str) ⇒ Boolean
5 6 7 8 9 |
# File 'lib/has_dynamic_columns/dynamic_column_validation.rb', line 5 def is_valid?(str) matches = Regexp.new(self["regexp"]).match(str.to_s) return !matches.nil? end |