Description
Hi,
If I validate against Zoopla's list/update schema here, i always get errors on one field (description->0->text) Whereas is I submit to them, it goes through ok. Very frustrating, as an error in submission restarts their error count, and its 7 days error free in order to go live with them! I'd rather be validating before submitting to avoid this.
That aside, I tried putting the schema in as a local file, but now with the same data, every property is invalid! Any ideas why that'd be?
Their schema: https://realtime-listings.webservices.zpg.co.uk/docs/latest/schemas/listing/update.json
// Validate
$validator = new \JsonSchema\Validator;
$validator->validate($objRequest->property, (object)['$ref' => 'file:///var/www/..some path../schema/update.json']);
Any help would be appreciated!
Here's some info from Zoopla themselves about their schema and regex and PHP...
I dont quite understand how I can work around it. Ideas welcome there too.
"The PHP library issue have only come to light recently and due to our perl backend system which does not (at present) use ECMA 262 regular expressions, we've end up with a situation where due to the JSON spec being quite lenient in this respect
ok: zpg regex -> JSON spec
ok: php ECMA 262 parsers -> JSON spec
not ok: zpg regex < - > php ECMA 262 parsers
from an earlier message:
If you are using php do not validate on your side unless you want to extend the validators regex handling then please note that I have taken a look at the recommended list on JSONschema or. All of them seem to make use of phps internal regex syntax "" preg_match "". Since PHP regex strings need delimiters (/myregex/ or variants thereof) coupled with the JSON spec not explicitly demanding this (as most implementations would use JavaScript(ish) regex ECMA 262 which does make use of delimiters)"