class OpenApi::PrimitiveValidator
- OpenApi::PrimitiveValidator
- Reference
- Object
Defined in:
validators/primitive_validator.crConstant Summary
-
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 Method Summary
- .max_items_error(name : String, value : Int, max : Int) : String | Nil
- .max_length_error(name : String, length : Int, max : Int) : String | Nil
- .max_number_error(name : String, value : Number, max : Number, exclusive : Bool = false) : String | Nil
- .min_items_error(name : String, value : Int, min : Int) : String | Nil
- .min_length_error(name : String, length : Int, min : Int) : String | Nil
- .min_number_error(name : String, value : Number, min : Number, exclusive : Bool = false) : String | Nil
- .pattern_error(name : String, value : String, pattern : Regex) : String | Nil
- .validate_max_items(name : String, value : Int, max : Int) : Nil
- .validate_max_length(name : String, length : Int, max : Int) : Nil
- .validate_max_number(name : String, value : Number, max : Number, exclusive : Bool = false) : Nil
- .validate_min_items(name : String, value : Int, min : Int) : Nil
- .validate_min_length(name : String, length : Int, min : Int) : Nil
- .validate_min_number(name : String, value : Number, min : Number, exclusive : Bool = false) : Nil
- .validate_pattern(name : String, value : String, pattern : Regex) : Nil
Class Method Detail
def self.max_number_error(name : String, value : Number, max : Number, exclusive : Bool = false) : String | Nil
#
def self.min_number_error(name : String, value : Number, min : Number, exclusive : Bool = false) : String | Nil
#
def self.validate_max_number(name : String, value : Number, max : Number, exclusive : Bool = false) : Nil
#