Comments (4)
Obviously that's not quite right... it would need to be a macro to disappear on compilation, but that's the general idea. I'd be happy to work on it if this functionality is desirable.
Also, do we still need to return a list for each key? The short-circuiting means only one error is returned for each key.
from bouncer.
And now I think this is probably a bad idea. Assertion methods should return nil (as this does), but then it is not suitable for use in a pre/post conditions. This would just be a utility method to stick in code during debugging, but then the needs are just as easily met by (assert (or (valid? args) (pr-str args))
. I'm interested in feedback.
from bouncer.
Sorry about the delay. I'll have a think about this and come back to you.
Regarding returning lists, that's there for backwards compatibility - the short-circuiting mechanism hasn't always been there.
from bouncer.
Hi @ToBeReplaced ,
I think this feature should probably be left out of the core functionality and into the user code.
It seems to be mostly concerned with control flow and error presentation. For that reason, I'm closing this issues.
Feel free to re-open it if you think you have better arguments as to why this should be in the core lib.
Thanks
from bouncer.
Related Issues (20)
- namespace-qualify meta keys HOT 3
- Return a seq/list of validation errors from a validation function HOT 4
- feature: remove pairs that validation do not handle HOT 5
- v/matches implies v/required? HOT 1
- Errors in a list, and short circuiting HOT 3
- Messages customized based on input HOT 6
- Release a new version HOT 5
- Password confirmation HOT 1
- What is the point of repeat in first value of vector and :bouncer.core/errors? HOT 1
- Should have a way to validate that no extra keys are given in map HOT 1
- v/datetime validates strings which f/parse doesn't HOT 1
- Validators aren't applied if defined after applying a common set HOT 1
- Personal error for every item in vector HOT 1
- :pre functions do not get nested values
- Why are these different?
- Email validation error in domain part HOT 1
- Coercion for fields
- Is it still alive? HOT 6
- Couldn't load library HOT 1
- Unexpected `matches` behavior HOT 1
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 bouncer.