Skip to content

Commit

Permalink
review: addressed the suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AgniveshChaubey committed Feb 20, 2024
1 parent ffb54ca commit 36967d5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions content/2020-12/validation/exclusiveMinimum.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ related:

The `exclusiveMinimum` keyword is used to set an exclusive lower limit on numeric instances. It specifies that the numeric value being validated must be strictly greater than (not equal to) the provided minimum value.

* Applies only to number data types (integers and floats).
* Applies only to number data types (integers and real numbers).
* Validation succeeds if the number is strictly greater than the specified `exclusiveMinimum`.

## Examples
Expand All @@ -46,15 +46,15 @@ The `exclusiveMinimum` keyword is used to set an exclusive lower limit on numeri
5
{{</instance-fail>}}

{{<schema ` Schema allowing either a string value or a numeric value with an exclusive lower limit of 10`>}}
{{<schema ` Schema allowing either a string value or a numeric value with an exclusive lower limit of 10.2`>}}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": [ "string", "number" ],
"exclusiveMinimum": 10
"exclusiveMinimum": 10.2
}
{{</schema>}}

{{<instance-pass `An instance with a numeric value greater than 10 is valid`>}}
{{<instance-pass `An instance with a numeric value greater than 10.2 is valid`>}}
15
{{</instance-pass>}}

Expand All @@ -66,6 +66,10 @@ false
"Hello World!"
{{</instance-pass>}}

{{<instance-fail `An instance with a numeric value less than 10.2 is invalid`>}}
10.01
{{</instance-fail>}}

{{<schema `Schema with both 'minimum' and 'exclusiveMinimum' keywords`>}}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
Expand Down

0 comments on commit 36967d5

Please sign in to comment.