* Rename HOC/Wrapper export to `withFormsy` This is more in alignment with community practices. * Migrate from npm to yarn * Update package.json Use order listed on https://yarnpkg.com/en/docs/package-json * Update README.md New examples, and small copy/whitespace changes * Remove CHANGES.md We will use github release from now on * Fix test suite Replace all references to with * Add ESLint * Update dependencies * Upgrade babel dependencies * Upgrade jsdom * Upgrade nodeunit and sinon * Upgrade webpack and webpack-dev-server * Fix examples * Convert to ES6 classes * Fix ESLint errors and warnings (WIP) * Fix more ESLint errors and warnings (WIP) * Move runRules to utils.js * Fix more ESLint errors and warnings (WIP) * Fix more ESLint errors and warnings (WIP) * Fix more ESLint errors and warnings (WIP) * Use less complex regex's for url and email * Change grammar in README * Change export pattern * Use ES6 export for utils and validationRules * Fix login example * Reorder methods alphabetically and remove "magical" `validate` feature * Remove `validate` from API docs (and general cleanup of file) * Update examples (removes `validate` feature) * Rename webpack file and remove json loader * Fix code samples in README * Update reset-values example (WIP) * Cleanup reset-values example * Fix prop type for Wrapper value * Handle onReset event * Update reset-value example to support `<button type="reset">` * Update dynamic form fields example |
||
|---|---|---|
| .. | ||
| components | ||
| custom-validation | ||
| dynamic-form-fields | ||
| login | ||
| reset-values | ||
| .eslintrc | ||
| README.md | ||
| global.css | ||
| index.html | ||
| webpack.config.js | ||
README.md
Formsy React Examples
To run and development examples:
- Clone this repo
- Run
npm install - Start the development server with
npm run examples - Point your browser to http://localhost:8080
Possible Issues
Examples might not run if you have an old node packages. Try clear npm cache and reinstall dependencies:
rm -rf node_modules
npm cache clean
npm install
npm run examples
If it is not helped try update your node.js and npm.
Examples
-
Two required fields with simple validation.
-
One field with added validation rule (
addValidationRule) and one field with dynamically added validation and error messages. -
Reset text input, checkbox and select to their pristine values.
-
Dynamically adding and removing fields to form.