https://github.com/onface/form-test
The form data validation library.Does not contain UI.
https://github.com/onface/form-test
Last synced: 16 days ago
JSON representation
The form data validation library.Does not contain UI.
- Host: GitHub
- URL: https://github.com/onface/form-test
- Owner: onface
- Created: 2017-01-28T14:55:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T06:42:54.000Z (about 8 years ago)
- Last Synced: 2025-04-19T04:56:35.341Z (about 1 month ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# form-test
[Online Documents](https://fast-flow.github.io/form-test) or [docs/README.md](./docs/README.md)
> The form data validation library.Does not contain UI.
```js
var Test = require('form-test')
var test = new Test()test.check('some', {
name: '用户名',
tests: [
{
rule: 'required'
}
]
}, {
always: function () {
console.log('check done')
},
done: function () {
console.log('done')
},
fail: function (errros) {
console.log(errros[0].errorMsg)
}
})
```