
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
meteor-simple-schema-transform
Advanced tools
Build validate functions for redux-form from Meteor SimpleSchema
Transform
Meteor SimpleSchema
objects into other objects
and functions
for use with a variety of form engines, validators, etc.
A helper to turn a Meteor SimpleSchema into a variety of translations and transformations, for use with any other form builder, validator, submitter, etc.
The goal is to make SimpleSchema a portable source, for other libraries.
This is a very early idea project. Take a look at this forum thread
Also checkout the excellent uniforms project for a more complete solution for forms (though more tied to Meteor).
npm i --save meteor-simple-schema-transform
There are various parts you may want to use. Include only those tools you need.
Missing a tool/translation? (add it and submit a PR)
Build SimpleSchema into a value cleanup function - clean values object based on schema
// MyContainer
import { Meteor } from 'meteor/meteor';
import { createContainer } from 'meteor/react-meteor-data';
import { MyPage } from '../pages/MyPage';
import SST from 'meteor-simple-schema-transform';
const mySchema = new SimpleSchema({
name: {
label: "Friendly Name",
type: String,
min: 3,
max: 30,
}
});
const cleaner = SST.buildClean(mySchema);
export default createContainer(({ params }) => {
// ....
saveData (data) {
Meteor.call('myMethod', cleaner(data), (err) => {
if (err) console.error('Got Error on saveData', err);
});
}
return {
saveData
}
}, MyPage);
Build SimpleSchema into a validate function for use with ReduxForm
// MyContainer
import { Meteor } from 'meteor/meteor';
import { createContainer } from 'meteor/react-meteor-data';
import { MyPage } from '../pages/MyPage';
import SST from 'meteor-simple-schema-transform';
const mySchema = new SimpleSchema({
name: {
label: "Friendly Name",
type: String,
min: 3,
max: 30,
}
});
const cleaner = SST.buildClean(mySchema);
const validate = SST.forReduxForm.buildValidate(mySchema);
export default createContainer(({ params }) => {
// ....
saveData (data) {
Meteor.call('myMethod', cleaner(data), (err) => {
if (err) console.error('Got Error on saveData', err);
});
}
return {
saveData,
validate
}
}, MyPage);
FAQs
Build validate functions for redux-form from Meteor SimpleSchema
The npm package meteor-simple-schema-transform receives a total of 1 weekly downloads. As such, meteor-simple-schema-transform popularity was classified as not popular.
We found that meteor-simple-schema-transform demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.