Every type will come with a function that validates the instances of that type. These functions are functions defined in Wikifunctions. This task is to actually use these functions to validate instances.
Description
Details
Event Timeline
I’m wondering whether it would make sense to think of a Z4K3/validator (function) as a constructor for validated instances of objects of the specified type. In practice, this would add an additional key into validated instances, with its value being the list of Z5/Errors (an empty list in the case of a valid object). For example, the valid positive integer represented by "2" would be the object {"Z1K1": "Z70", "Z70K1": "2", "Z70K2": []}. The unvalidated instance, on the other hand, would be a Z7/Function call to the Z70 validator/constructor function, passing "K1": "2" (and expecting type+value+errors – a validated Z70 instance – in return). This ensures that only the validator/constructor function can provide the Z70K2/errors value.
Change 720023 had a related patch set uploaded (by Lindsay Wardell; author: Lindsay Wardell):
[mediawiki/extensions/WikiLambda@master] Enable validation on function calls
Change 720025 had a related patch set uploaded (by Lindsay Wardell; author: Lindsay Wardell):
[mediawiki/services/function-orchestrator@master] Enable validation by default, and defer to input when provided
Change 720023 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] Enable validation on function calls
Change 720025 merged by jenkins-bot:
[mediawiki/services/function-orchestrator@master] Enable validation by default, and defer to input when provided