hi all ,
I do the work of validating user inputs on the client side myself.
But I do not know what to do to validate the server side and methods
And according to npm, the check package is invalid.
What should I do ?
My friends, I am looking for a package with the following features
- Check the length of input characters
- Check formats such as email, date, etc.
- Check string and int
Something like Laravel validation system
Please help me, this is definitely an issue that everyone has encountered
check
is a Meteor package – see https://docs.meteor.com/api/check.html
The currently recommended way of writing Meteor methods however is with ValidatedMethod
, see https://guide.meteor.com/methods.html#validated-method
Along that package comes SimpleSchema
for parameter checking. For the latter install and use https://github.com/aldeed/simpl-schema
Please update title, check is not deprecated!
I use simple schema to validate method inputs a lot of the time since it makes real easy to check lengths, apply regex, check types, set some stuff as optional etc all in one go for multiple inputs
Hey, this title is super-confusing. Check is not deprecated. AFAIK, it’s not even on npm, at least not officially.
I say this package :
But I think collection2 AND simple schema It has the best performance
Fixed the title to be more accurate.
I would love to move this package under MCP management, but sadly there is no repository for it.
Yeah, I saw that. But it’s not an official one. Raix seems to have pushed it there.