Skip to content

String "uri" format validation doesn't work #353

Closed
@k-rudy

Description

@k-rudy

As stated in Readme - uri string format belongs to the list of standard supported validations. But it doesn't work:

require "json-schema"

schema = { "type": "string", "format": "uri" }
JSON::Validator.validate(schema, 'invalid uri string') # this returns true, but provided value is not a valid uri

To make sure this is only an issue with uri and not with date-time for example, I have checked:

schema = { "type": "string", "format": "date-time" }
JSON::Validator.validate(schema, 'not a valid date') # returns false as expected

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions