Skip to content

MinLength and MaxLength validator failed in official test suites due to Java string Unicode handling "\uD83D\uDCA9\uD83D\uDCA9" #4

@stevehu

Description

@stevehu

The following test failed as Java string length function returns 4 instead of 2 for those special characters. Similar test in MinLength failed too.

[
{
"description": "maxLength validation",
"schema": {"maxLength": 2},
"tests": [
{
"description": "two supplementary Unicode code points is long enough",
"data": "\uD83D\uDCA9\uD83D\uDCA9",
"valid": true
}
]
}
]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions