From cce444fb6ac5304c76a7c595c9470b1cc00949e1 Mon Sep 17 00:00:00 2001 From: Agnivesh Chaubey Date: Mon, 12 Feb 2024 16:22:34 +0530 Subject: [PATCH] Update minLength.markdown --- content/2020-12/validation/minLength.markdown | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/content/2020-12/validation/minLength.markdown b/content/2020-12/validation/minLength.markdown index 76245536..55fd4540 100644 --- a/content/2020-12/validation/minLength.markdown +++ b/content/2020-12/validation/minLength.markdown @@ -16,49 +16,3 @@ related: - vocabulary: format-annotation keyword: format --- - -The `minLength` keyword is used to specify the minimum length of a string. It defines the minimum number of characters that a valid string must have to satisfy the schema. - -* Applies only to string data types. -* Value must be a non-negative integer. -* String length is counted in characters, not bytes. -* Validation succeeds if the string length is greater than or equal to the specified `minLength`. - -## Examples - -{{}} -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "minLength": 5 -} -{{}} - -{{}} -"This is a valid string" -{{}} - -{{}} -"foo" -{{}} - -{{}} -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": ["string", "number"], - "minLength": 3 -} - -{{}} - -{{}} -"foo" -{{}} - -{{}} -"hi" -{{}} - -{{}} -55 -{{}} \ No newline at end of file