Gathering detailed insights and metrics for mobx-schema-form
Gathering detailed insights and metrics for mobx-schema-form
Gathering detailed insights and metrics for mobx-schema-form
Gathering detailed insights and metrics for mobx-schema-form
mobx-react-form
Reactive MobX Form State Management
@yoskutik/mobx-form-schema
The simple way to organize you forms!
form-capacitor
Strictly typed form state manager for React with as you type validation for many inputs with pretty errors using a json-schema definition and rules and a few simple Hooks
tiny-mobx-form
Tiny (~2KB) tree-shakable MobX form library
npm install mobx-schema-form
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
22 Stars
151 Commits
6 Forks
3 Watchers
13 Branches
2 Contributors
Updated on Dec 15, 2021
Latest Version
1.14.2
Package Id
mobx-schema-form@1.14.2
Unpacked Size
158.12 kB
Size
21.76 kB
File Count
22
NPM Version
6.13.4
Node Version
12.14.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
8
28
MobX Schema Form is part of a collection of loosely-coupled components for managing, rendering and validating forms in MobX-based apps.
https://alexhisen.gitbooks.io/mobx-forms/
mobx-schema-form renders form widgets (by default Material Design) based on schema and form definition in json-schema-form format. Includes intelligent real-time validation and display of validation error message in each widget.
mobx-schema-form is a syntax-compatible wrapper around the low-level utils of react-schema-form. By default, mobx-schema-form uses React-Toolbox widgets instead of material-ui and wires up the widgets to work with MobX FormStore. It also adds some improvements primarily in the area of validation.
mobx-schema-form requires React 15 or 16, MobX 2.2+, 3.x, 4.x or 5.x, mobx-react 3.5+, 4.x or 5.x and expects models to be instances of MobX FormStore or objects in the modelShape (with at minimum data and dataErrors object properties). Unlike FormStore, which is published as a UMD module to NPM, mobx-schema-form is published in CommonJS ES5 format. In addition, default use of MobxSchemaForm requires React-Toolbox, which in turn requires your environment to be able to load SASS (React-Toolbox 1.x) or PostCSS/cssnext (React-Toolbox 2.x) files via require/import - i.e. properly configured webpack.
npm install --save mobx-schema-form
Note that npm will issue a warning about an unmet peer dependency of material-ui for react-schema-form. You can safely ignore it. The portion of react-schema-form we use does not require material-ui.
As of v1.7, react-toolbox is now a peer dependency, so you must install it yourself with npm install react-toolbox.
1import React from 'react'; 2import { observer } from 'mobx-react'; 3import { MobxSchemaForm } from 'mobx-schema-form'; 4import SaveButton from 'mobx-schema-form/lib/SaveButton'; 5import model from './myStore.js'; // a singleton instance of MobX FormStore 6 7/* eslint-disable quotes, quote-props, comma-dangle */ 8// typically this would be in an external static json file 9const schemaJson = { 10 "schema": { 11 "type": "object", 12 "title": "MySchema", 13 "properties": { 14 "email": { 15 "title": "Email", 16 "type": "string", 17 "pattern": "^[A-Za-z0-9!#-'\\*\\+\\-/=\\?\\^_`\\{-~]+(\\.[A-Za-z0-9!#-'\\*\\+\\-/=\\?\\^_`\\{-~]+)*@[A-Za-z0-9!#-'\\*\\+\\-/=\\?\\^_`\\{-~]+(\\.[A-Za-z0-9!#-'\\*\\+\\-/=\\?\\^_`\\{-~]+)*$", 18 "validationMessage": { 19 "default":"Email must be of proper format: abc@xyz.com", 20 "302": "Email is required" 21 } 22 } 23 }, 24 "required": ["email"] 25 }, 26 "form": [ 27 { 28 "key": "email", 29 "type": "email" 30 } 31 ] 32}; 33/* eslint-enable */ 34 35@observer class MyForm extends React.Component { 36 render() { 37 return ( 38 <form> 39 <MobxSchemaForm 40 schema={schemaJson.schema} 41 form={schemaJson.form} 42 model={model} 43 /> 44 <SaveButton 45 model={model} 46 options={{ allowCreate: true, saveAll: true }} 47 label="Save" 48 disabled={!model.status.canSave} 49 type="submit" 50 /> 51 </form> 52 ); 53 } 54}
Note that MobxSchemaForm uses the same props as react-schema-form's SchemaForm, except what react-schema-form calls model is actually model.data in mobx-schema-form. It also supports 'option' for compatibility with SchemaForm, though the correct form in MobxSchemaForm is 'options' plural.
If you use react-hot-loader, you may find that Radio widgets are non-functional. In the current beta of React-Toolbox 2.x, you can work-around this issue by placing this code somewhere in your app (like an index.js):
1import { overrideComponentTypeChecker } from 'react-toolbox/lib/utils/is-component-of-type'; 2 3// Work-around for react-hot-loader issue in React-Toolbox - see https://github.com/react-toolbox/react-toolbox/pull/1164 4overrideComponentTypeChecker((classType, reactElement) => { 5 return reactElement && ( 6 reactElement.type === classType || 7 reactElement.type.name === classType.displayName 8 ); 9});
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
67 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More