-
Notifications
You must be signed in to change notification settings - Fork 61
Contributor Documentation
jpillora edited this page Sep 10, 2014
·
5 revisions
Contributors are needed!
- Convert to CommonJS and add CommonJS compiler to Grunt
- Fix "Pending execution" bug which sometimes occurs
- Move user documentation (jpillora/verify-com) to this repo under
doc/
- Finish user documentation
- Convert jQuery Promises to Bluebird
- Remove jQuery dependency!
- Allow specific builds based on validation rules (rule-refactor branch)
- Form objects contain form validation state and a list of element objects
- Element objects contain element validation state and a list of validators
- Validators are functions which return true or error string
- Execution objects are basically just wrappers around jQuery promises
- FormExecution objects start FieldExecutions and GroupExecutions in parallel
- FieldExecutions objects start Validators in series
This diagram attempts to show this flow:
-
$.verify("#my-form")
wraps an html form in a form object which listens forsubmit
events - On
submit
Execution objects are created and started, the above promise flow occurs and should return withtrue
or"an error message"
- Displaying error messages has been split out into a separate project – Notify.js http://notifyjs.com
Grunt is currently being used to concatenate all the source files into one script, output this as the development version and then minify and output a production version.
There is currently no module management, all source files are wrapped in a function to create "project scope" and then each source file defines a set independent modules/classes which can be used throughout.
To run Grunt:
git clone https://github.com/jpillora/verifyjs
cd verifyjs
- Download Node.js
-
npm install
(This will download http://phantomjs.org/ which is used to run the tests) -
grunt
(This doesgrunt build test
)