function-schemata code can be found at https://gerrit.wikimedia.org/g/mediawiki/services/function-schemata
booleanResult = validateFunction( something); status = validationStatus( booleanResult, validateFunction.errors );
Conceivably, if the same validator were called twice simultaneously, validateFunction.errors could be overwritten before any status was generated:
Thread1: booleanResult = validateFunction( something ); Thread2: booleanResult = validateFunction( something ); Thread1: # tries to generate status with Thread2's errors!
Do something about this:
- we can allocate a new validator for each validation event (expensive)