Class: Monerorequest::Validator::CustomLabel

Inherits:
Object
  • Object
show all
Defined in:
lib/monerorequest/validator/custom_label.rb

Overview

validates the custom_label field

Class Method Summary collapse

Class Method Details

.validate!(data) ⇒ Object



7
8
9
10
11
12
# File 'lib/monerorequest/validator/custom_label.rb', line 7

def self.validate!(data)
  errors = []
  errors.push("custom_label must be present.") unless data.key?("custom_label")
  errors.push("custom_label must be a String.") unless data["custom_label"].is_a?(String)
  errors
end