This is a powerful feature that allows you to set up either forced values or default values, potentially based on the values of other fields in the object.
Without this transformation, client-side inserts and updates might succeed on the client but then fail on the server.
Alternatively, if you don't care about losing the custom type, you can explicitly set to potentially change the value of a property in the object being cleaned.
A validation context provides reactive methods for validating and checking the validation status of a particular object.
It's usually best to use a named validation context.
Error handlers that are targeted for humans will use these as positional arguments when formatting a message with with the field and a string as message.
However the resulting error will contain no information about the violated constraint.
If you don't want it to be in the doc or modifier, you must call before every insert, update, or upsert.
Before you can validate an object against your schema, you need to get a new validation context from the Simple Schema.
This is supposed to maintain backward compatibility, but can also be used when an in-depth error handling isn’t needed.
A simple, reactive schema validation package for Meteor. If necessary, though, you can use string keys with mongo-style dot notation to validate nested arrays and objects. This is fine because they will be implicitly defined for you.
As schemas themselves are validated, you can provide constraints as literal Python expression in the docstring of the rule’s implementing method to validate the arguments given in a schema for that rule.