Skip to content

Commit

Permalink
regex example - instance out of bound
Browse files Browse the repository at this point in the history
  • Loading branch information
AgniveshChaubey authored Feb 9, 2024
1 parent 6e6fe46 commit 29847b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion content/2020-12/validation/pattern.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ The `pattern` keyword in JSON Schema is designed to define a regular expression
{{<instance-fail `An instance with special character in invalid`>}}
"invalid#username"
{{</instance-fail>}}

{{<instance-fail `An instance that matches the regex but goes out of bounds is invalid`>}}
"username_toolong123"
{{</instance-fail>}}
- _This keyword can be combined with other string-related keywords, such as `maxLength` and `minLength`, for comprehensive validation._

{{<schema `Schema with regular expression for some specific pattern`>}}
Expand Down Expand Up @@ -108,4 +112,4 @@ The `pattern` keyword in JSON Schema is designed to define a regular expression

{{<instance-fail `An instance containing characters other than "apple" is invalid`>}}
"I love apples!"
{{</instance-fail>}}
{{</instance-fail>}}

0 comments on commit 29847b3

Please sign in to comment.