eclipsesource/play-json-schema-validator

uuid format

Closed this issue · 2 comments

Hi,

I am using "format": "uuid" for a string field.
and that is my example value:
6abd01c0-9236-4ba7-8cbd-3e866ad9385a

I have checked here:
http://www.uuid-validator.com/
and my uuid indeed valid one (version 4)

however when I am trying to validate the value, I am getting "Unknown format uuid"]

Thanks,

Hi, the validator currently only supports the formats as described here, so there's no format for UUID currently, also see the list of suggested formats. But having such a format is definitely useful, so I'll be adding it, maybe together with an extension mechanism to also add custom formats.
Thanks for the input!

I've updated the validator to 0.8.1 which supports custom formats and includes a built-in format uuid. For a usage example how to include custom formats, see here. I'll update the docs accordingly the next days. If there are any questions, please go ahead.