Comments (4)
Re the combining part -- something like this maybe would be a nice api?
var creditCardValidator = LGTM.validator()
.validates('number').required('You must enter a card number')
.validates('expiration').required('Expiration is required')
.build();
var paymentInfoValidator = LGTM
.validator()
.validates('creditCard').using(creditCardValidator)
.build();
How to merge the two results together would be an interesting challenge though.
from lgtm.
This is an area LGTM could definitely improve. Most commonly at Square the problem that LGTM doesn't solve well is validating repeated child properties, i.e. children whose values are lists of things. How do you think you'd solve such a case?
from lgtm.
Closing as inactive.
from lgtm.
@pselden Did you find a work around for this? Your second example looks ideal.
from lgtm.
Related Issues (20)
- LGTM standalone | $$config$$config.async method is undefined HOT 2
- Question: why is validation response structure like it is? HOT 6
- Composing chained validations from multiple validators HOT 2
- add default messages HOT 3
- Ensure `required` calls without a message fail
- Publish sourcemaps HOT 2
- Dynamic messages HOT 1
- Online demo is broken HOT 1
- Add support for custom message HOT 5
- Version 10 of node.js has been released
- The automated release is failing 🚨 HOT 4
- Changing input values as part of validation? HOT 2
- Current version on NPM doesn't include commonjs build HOT 3
- An in-range update of mocha is breaking the build 🚨 HOT 8
- An in-range update of rollup is breaking the build 🚨 HOT 87
- An in-range update of gzip-size is breaking the build 🚨 HOT 2
- Dependent validations cause duplicate errors HOT 1
- An in-range update of uglify-js is breaking the build 🚨 HOT 17
- An in-range update of babel7 is breaking the build 🚨 HOT 18
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 lgtm.