-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.0.0 beta #477
base: master
Are you sure you want to change the base?
v1.0.0 beta #477
Conversation
* Up node to 8.2.1; only allow React v15+ * Update HOC to ES6 component; kill Mixin and decorator * Update all tests; ES6ify everything! * Update examples to ES6 classes * Update API docs * Fix broken/commented test case * Move peer dep to regular dep since peer is deprecated
* Add propTypes to API docs; move innerRef doc to match location in table of contents * Change HOC to Wrapper (be consistent everywhere) * Inject defaultProps.value from wrapped component into Formsy.Wrapper This way users can provide a default value for their form field. Previously, this was possible because mixins were on the same level as the actual component. * Add optional parameter to setState to disable validation * Update prepublish script to clean `lib`; rebuild release folder
* 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
}; | ||
|
||
const addValidationRule = (name, func) => { | ||
validationRules[name] = func; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will overwrite any existing validation rule with the same name. This can lead to unexpected behaviour, especially when working on large projects or projects with multiple developers. The following snippet will warn the user if they attempt to add a validation rule with a name that already exists. There's also an override parameter to allow the user to forcibly overwrite existing validation rules.
Formsy.addValidationRule = function (name, func, force = false) {
if (!force && Object.keys(validationRules).indexOf(name) !== -1) {
console.error(`A Validation Rule with the name '${name}' already exists`);
return;
}
validationRules[name] = func;
};
Is there any date for a preview release of this version? Really looking forward to integrate to our projects! |
any plans for releasing date? |
@aesopwolf Is this project abandoned? Are we limited by the owner? Is there anything we can do to un-stick the project and start getting updates out? |
I thought I had the time to help bring this project back to life, but I haven't be able to help out nearly as much as I thought I could. I just gave @maccuaa, @track0x1, @twisty, and @sdemjanenko access to the npm project. (You were just the first people that came to mind). Lastly, this project should be converted to a github org, preferably https://github.com/formsy (but that's currently taken). So maybe https://github.com/formsy-react for the time being, @rkuykendall do you want to set that up? You could then invite those 4 people I mentioned above to be owners on the github org. |
Done. https://github.com/formsy-react Really appreciate all the work you've done and your help making sure this project is able to continue to succeed when you don't have as much time as you would like. |
@aesopwolf Added all as owners. Let me know if there's anything else you need from me. |
@aesopwolf @rkuykendall Hi guys. I removed @formsy org, you can use this if you want. |
This is going to be a living PR in preparation for v1.0.0.
I would be super grateful if the community opened PR's against this branch and added comments/requests/suggestions here.