Class: ProMotion::Validator
- Inherits:
-
Object
- Object
- ProMotion::Validator
- Defined in:
- lib/ProMotion/XLForm/validators/validator.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/ProMotion/XLForm/validators/validator.rb', line 3 def @message end |
Instance Method Details
#isValid(row) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/ProMotion/XLForm/validators/validator.rb', line 5 def isValid(row) is_valid = nil is_valid = valid?(row) if self.respond_to?(:valid?) return nil if is_valid.nil? XLFormValidationStatus.formValidationStatusWithMsg(@message, status: is_valid, rowDescriptor: row) end |
#valid?(row) ⇒ Boolean
13 14 15 |
# File 'lib/ProMotion/XLForm/validators/validator.rb', line 13 def valid?(row) mp "You have to override valid?", force_color: :red end |