Re: [pve-devel] [PATCH common 1/2] JSONSchema: add format validator support and cleanup check_format

2020-04-21 Thread Fabian Grünbichler
sorry, took a bit longer than I wanted, but here it is. thanks for looking into this! :) at first glance it seemed like it's more straight-forward than I expected - but as always with JSONSchema.pm, some rabbit-hole chasing later I am not quite so sure anymore. I hope my walls of text below

[pve-devel] [PATCH common 1/2] JSONSchema: add format validator support and cleanup check_format

2020-04-16 Thread Stefan Reiter
Adds a third, optional parameter to register_format that allows specifying a function that will be called after parsing and can validate the parsed data. A validator should die on failed validation, and can also change the parsed object by returning a modified version of it. This is useful so one