Class: LIVR::Rules::Common::Required
- Inherits:
-
LIVR::Rule
- Object
- LIVR::Rule
- LIVR::Rules::Common::Required
- Defined in:
- lib/livr/rules/common.rb
Instance Method Summary collapse
Methods inherited from LIVR::Rule
Constructor Details
This class inherits a constructor from LIVR::Rule
Instance Method Details
#call(value, user_data, field_results) ⇒ Object
6 7 8 9 |
# File 'lib/livr/rules/common.rb', line 6 def call(value, user_data, field_results) return if value.in?([[], {}]) "REQUIRED" if value.blank? end |