Class: Rulix::Validators::RequiredValidator
- Inherits:
-
Object
- Object
- Rulix::Validators::RequiredValidator
- Defined in:
- lib/rulix/validators/required_validator.rb
Instance Method Summary collapse
Instance Method Details
#call(value) ⇒ Object
4 5 6 7 8 |
# File 'lib/rulix/validators/required_validator.rb', line 4 def call value return [false, 'is required'] unless value true end |
#to_proc ⇒ Object
10 11 12 |
# File 'lib/rulix/validators/required_validator.rb', line 10 def to_proc method(:call) end |