Skip to content
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

Provide an example with form validation #318

Closed
jgamedev opened this issue Jun 11, 2016 · 4 comments
Closed

Provide an example with form validation #318

jgamedev opened this issue Jun 11, 2016 · 4 comments

Comments

@jgamedev
Copy link

jgamedev commented Jun 11, 2016

Forms and form validation are some of the most common elements in web apps.

It would be very useful to have an example with this use case.

@jgamedev jgamedev changed the title Provide examples with forms and form validation where can I find examples with forms? Jun 11, 2016
@jgamedev jgamedev changed the title where can I find examples with forms? Provide an example with form validation Jun 11, 2016
@mweststrate
Copy link
Member

Probably deserves an own doc page or package, but it should be pretty straightforward to roll your own, like done for example in this fiddle: https://jsfiddle.net/royriojas/qp5p33cn/

@jgamedev
Copy link
Author

jgamedev commented Jun 11, 2016

:gratitude:

Although I suspect ( and I could be wrong) that these days a lot of people generate the fields dynamically using a pattern such as this:

FIELDS = [
{
name: 'User',
value: this.user,
validations: [isEmpty]
},
{
name: 'Password',
value: this.password,
validations: [isValidPassword]
}];

@mweststrate
Copy link
Member

Added the above link to #104. If somebody builds a ready to use abstraction, welcome :). Closing this issue for now

@foxhound87
Copy link

foxhound87 commented Jun 23, 2016

https://github.com/foxhound87/mobx-react-form

demo: https://foxhound87.github.io/mobx-react-form/demo.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants