Open karenetheridge opened 3 years ago
I would love to be able to have the existing maximum
, minimum
keywords support strings, but there is the question of what to do about non-ascii characters. We could simply say that all non-ascii characters would be replaced by 0x80 for the purpose of string comparisons, so that all non-ascii characters are "greater" than ascii characters, and all non-ascii characters are equivalent to each other.
locale
: \caseSensitive
: \sorted
: \locale
andcaseSensitive
into account. evaluates to true when the instance array is(n't) sorted.maximum
,minimum
,exclusiveMaximum
,exclusiveMinimum
maximumString
,minimumString
,exclusiveMaximumString
,exclusiveMInimumString
: \locale
andcaseSensitive
into account. evaluates to true when the instance string successfully compares to the keyword string.(yes, some keyword names overlap with the "validation" vocabulary; this should be okay as we can infer the vocabulary based on instance and keyword data type. That is, if both vocabularies are in use, both vocabularies will look at these keywords and attempt to evaluate them, but the vocabulary(ies) with the mismatched data type(s) will do nothing.)When considering string ordering, we do NOT use the unicode codepoint order, but rather we respect the sorting and collation semantics of the stated locale -- see https://www.unicode.org/reports/tr10/. case-sensitive sorting will use Unicode Collation Level 4. case-insensitive sorting will use Unicode Collation Level 2.