class JSON::Schema::MinLengthAttribute

Public Class Methods

acceptable_type() click to toggle source
# File lib/json-schema/attributes/limit.rb, line 53
def self.acceptable_type
  String
end
error_message(schema) click to toggle source
# File lib/json-schema/attributes/limit.rb, line 61
def self.error_message(schema)
  "was not of a minimum string length of #{limit(schema)}"
end
limit_name() click to toggle source
# File lib/json-schema/attributes/limit.rb, line 57
def self.limit_name
  'minLength'
end
value(data) click to toggle source
# File lib/json-schema/attributes/limit.rb, line 65
def self.value(data)
  data.length
end