Comments (3)
Hey,
thank you I added this function now you have acces to testAll(array)
that performs tests over all the element of a array and returns the index of the element or -1 if no error is found
This feature is not on npm yet ill try to make a new release tonight
Released ✅
from forgjs.
Hi, i have taken a look at forgjs and so far everything looks pretty good, but i have one request. Can we have another method from test which can check the rules specified against multiple values. Example
`const someRule= new Rule({
type: 'yourType',
prop1: val1,
prop2: val2, ...
}, null);
someRule.testMultiple([values to test]) // returns true`
This will make validation of multiple values at once a breeze. If all the values are valid testMultiple returns true otherwise it will return the indices or the values which have failed the validation.
from forgjs.
Awesome, you are the man!!!!
from forgjs.
Related Issues (20)
- Type boolean? HOT 4
- Provide example with HTML form HOT 6
- Error message as fucntions HOT 10
- Support for validating Nested Objects HOT 1
- The equal value of rule HOT 3
- allowed fields HOT 9
- Validator.getErrors() HOT 5
- throw errors HOT 1
- example in README fails due to typos HOT 1
- errorMessages is empty array when validation fails due to unexpected field HOT 4
- Duplicate error messages when check for multiple types. HOT 2
- Validator.getErrors() throws an error on undefined fields
- changing the order of the rule properties causes an error
- Validating a null property will cause an error HOT 1
- Validating an undefined property will cause an error HOT 1
- create-react-app + forgJS HOT 11
- # doc and more doc
- Optional property to support "empty" values HOT 1
- Validating an empty string with notEmpty=false returns false HOT 7
- Incorrect error message returned on nested array rules HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forgjs.