19 lines
226 B
Ruby
19 lines
226 B
Ruby
|
|
require_relative "base"
|
||
|
|
|
||
|
|
module Validators
|
||
|
|
module FieldValidator
|
||
|
|
class NotNil < Base
|
||
|
|
|
||
|
|
def valid?
|
||
|
|
!@value.nil?
|
||
|
|
end
|
||
|
|
|
||
|
|
def message
|
||
|
|
"Value can not be undefined"
|
||
|
|
end
|
||
|
|
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|