Meteor integration package for simpl-schema
This package is back under maintenance by the Meteor Community Packages group 🚀 Consider this a hard-fork to ensure a future-proof maintenance with focus on Meteor-Compatibility (Meteor 2.x; 3.x and beyond)! ☄️
meteortesting:mocha
+ chaiThis is the 1:1 copy of the most recent available release that had full Meteor-Compatibility. While we wanted to move to long-termin include the newer NPM releases it was not possible without huge effort and ongoing maintenance would have been questionable!
Therefore we set a new hard-fork at this level and continue development with 100% Meteor compatibility. By doing so we will be able to mirgate this package towards Meteor 3.0 and thus also migrate dependant packages, like Collection2 or AutoForm.
Removed the old SimpleSchema.prototype.validator
NOTE: There was an accidental breaking change related to this in v1.4.0. Probably only aldeed:collection2 is affected. If you use aldeed:simple-schema v1.4.0 or higher along with aldeed:collection2, be sure to use aldeed:collection2 v2.7.1 or higher.
The ValidationError
thrown by validate
now provides a useful error message so that it is clear what the first error is if it is not caught and is printed to console above the stack trace.
When using check
to validate, the Match.Error
that is thrown now explains which field failed to validate and why (only the first error). All errors can be found in an invalidKeys
property on the Match.Error
object.
Bug fixes and MongoDB 2.6+ compatibility fixes
" "
will be cleanedAdded built-in regular expression SimpleSchema.RegEx.ZipCode
clean
function now automatically converts a number or string to a Date object. (Thanks @rlora)makeGeneric
handling when a property name starts with a number but also includes non-numeric characters. (Thanks @Nieziemski)exclusiveMax
and exclusiveMin
options allow you to specify that the min
or max
value itself should not be considered valid. (Thanks @sleiber)