class

OpenApi::PrimitiveValidator

Inherits Reference / Object

Constants

EXCLUSIVE_MAX_NUMBER_ERROR = "invalid value for \"%s\", the character length must be smaller than %s."
EXCLUSIVE_MIN_NUMBER_ERROR = "invalid value for \"%s\", the character length must be greater than %s."
MAX_ITEMS_ERROR = "invalid value for \"%s\", number of items must be smaller than or equal to %s."
MAX_LENGTH_ERROR = "invalid value for \"%s\", the character length must be smaller than or equal to %s."
MAX_NUMBER_ERROR = "invalid value for \"%s\", must be smaller than or equal to %s."
MIN_ITEMS_ERROR = "invalid value for \"%s\", number of items must be greater than or equal to %s."
MIN_LENGTH_ERROR = "invalid value for \"%s\", the character length must be greater than or equal to %s."
MIN_NUMBER_ERROR = "invalid value for \"%s\", must be greater than or equal to %s."
PATTERN_ERROR = "invalid value for \"%s\", must conform to the pattern %s."

Class methods

max_items_error(name : String, value : Int, max : Int) : String | Nil
Source
max_length_error(name : String, length : Int, max : Int) : String | Nil
Source
max_number_error(name : String, value : Number, max : Number, exclusive : Bool = false) : String | Nil
Source
min_items_error(name : String, value : Int, min : Int) : String | Nil
Source
min_length_error(name : String, length : Int, min : Int) : String | Nil
Source
min_number_error(name : String, value : Number, min : Number, exclusive : Bool = false) : String | Nil
Source
pattern_error(name : String, value : String, pattern : Regex) : String | Nil
Source
validate_max_items(name : String, value : Int, max : Int) : Nil
Source
validate_max_length(name : String, length : Int, max : Int) : Nil
Source
validate_max_number(name : String, value : Number, max : Number, exclusive : Bool = false) : Nil
Source
validate_min_items(name : String, value : Int, min : Int) : Nil
Source
validate_min_length(name : String, length : Int, min : Int) : Nil
Source
validate_min_number(name : String, value : Number, min : Number, exclusive : Bool = false) : Nil
Source
validate_pattern(name : String, value : String, pattern : Regex) : Nil
Source