Ignoring spaces in length validation for JSON Schema

Viewed 3694

Say you have this simple schema

{
  "type": "string",
  "minLength": 2,
}

The value "ab" would be valid, but the value "a " or " " would also be valid. Is there a way to ignore spaces when validating the length, so only "ab" is valid in this example?

2 Answers
Related