forms
forms copied to clipboard
An easy way to create, parse and validate forms in node.js
When I use `fields.number()`, it validates even if the field is not a number. ``` js import forms, { fields, validators } from 'forms'; const nestedForm = forms.create({ age: fields.number({...
In many cases it is easier to render the form manually in the template file. Consider a simple form: ``` javascript var form = forms.create({ q: forms.fields.string() }); form.handle(req, {...
https://github.com/caolan/forms/blob/fbb4e5dc6ff93a6e8d89480aff7e278f87403915/lib/forms.js#L71 } else if (obj instanceof http.IncomingMessage) { that line requires that you really have an instanceof http.IncomingMessage which is not really easy to create in a mock, and then...
Request a `JSON.stringify({},null,'\t')` kind of output through this. Which means the form created through our `forms.create({})` should be displayed just like pretty json and on click on any form field,...
How about adding a way to select countries? And have an option to either use full country names or 2 or 3 letter country codes.
Hi, is there a reason why you do not allow to add a style attribute? Best J.
I'm dynamically creating a form based on info loaded from a json file. I've tried everything I can think of to get a value loaded from the json to display...
Although the readme specifies that one of the goals is to use the same validation on the server side and on the front-end, I couldn't find anything to accomplish this....
I want to override the handle function returned when create is called. However, I cannot do so because there is not way to get at the definition. How would you...
The library node-validator has many advantages that can be use in your forms. Firstly, it has so much more validations than 'forms'. Secondly, it provides a lot of sanitization functions...