Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/hanami/validations
Validation mixin for Ruby objects
https://github.com/hanami/validations
Merge pull request #5 from lotus/better-errors
Better errors
953413b5e415ca7c7d5ec994b89e9cbd4d4744f3 authored over 10 years ago by Luca Guidi <[email protected]>
Implemented Errors#count
94aae2743df6f3129e015a725994f4fc2c08c436 authored over 10 years ago by Luca Guidi <[email protected]>
94aae2743df6f3129e015a725994f4fc2c08c436 authored over 10 years ago by Luca Guidi <[email protected]>
Introduced Lotus::Validations::Error
It represents a validation failure for a single attribute (eg required
email which is missing).
Implemented Errors#each and #map for easier introspection
1e0bb6aa2a60290cce29373666d82df033337525 authored over 10 years ago by Luca Guidi <[email protected]>
1e0bb6aa2a60290cce29373666d82df033337525 authored over 10 years ago by Luca Guidi <[email protected]>
Ensure to report multiple errors for a single attribute
102a7585843e3785cda30dbbdcba699568343094 authored over 10 years ago by Luca Guidi <[email protected]>
102a7585843e3785cda30dbbdcba699568343094 authored over 10 years ago by Luca Guidi <[email protected]>
Introducing Lotus::Validation::Errors
0e40989fda18036fef339843162984bcdafeaa09 authored over 10 years ago by Luca Guidi <[email protected]>
0e40989fda18036fef339843162984bcdafeaa09 authored over 10 years ago by Luca Guidi <[email protected]>
Return rich error informations
A single error now contains:
- Attribute
- Violated validation
- Expected value
- Actual value
Check validation names. Closes #4
1fd9b2d4db266a035a2e47a0fb1182f118def186 authored over 10 years ago by Luca Guidi <[email protected]>
1fd9b2d4db266a035a2e47a0fb1182f118def186 authored over 10 years ago by Luca Guidi <[email protected]>
Ensure unique attribute names as symbols
f07b255ed8d908fc94a9c7ea05c9072573731a30 authored over 10 years ago by Luca Guidi <[email protected]>
f07b255ed8d908fc94a9c7ea05c9072573731a30 authored over 10 years ago by Luca Guidi <[email protected]>
Additional tests for inheritance
1e620a143cdc942926bfaf4cf81ae2a2e3d5a1c8 authored over 10 years ago by Luca Guidi <[email protected]>
1e620a143cdc942926bfaf4cf81ae2a2e3d5a1c8 authored over 10 years ago by Luca Guidi <[email protected]>
Removed unused test
84f7d0f92377ecdea317cc23f9b09b99ce62819a authored over 10 years ago by Luca Guidi <[email protected]>
84f7d0f92377ecdea317cc23f9b09b99ce62819a authored over 10 years ago by Luca Guidi <[email protected]>
Implemented confirmation validation
301c7b25c424c474e79ca357b521c1cc9d5ac8d5 authored over 10 years ago by Luca Guidi <[email protected]>
301c7b25c424c474e79ca357b521c1cc9d5ac8d5 authored over 10 years ago by Luca Guidi <[email protected]>
Implemented esclusion validation
254c1aa2deea90af77bca20ee67baa111ff8e1ec authored over 10 years ago by Luca Guidi <[email protected]>
254c1aa2deea90af77bca20ee67baa111ff8e1ec authored over 10 years ago by Luca Guidi <[email protected]>
Implement Range#size when needed (eg JRuby)
fc3ecea577d25ff752e681da2f5bed3e247e488f authored over 10 years ago by Luca Guidi <[email protected]>
fc3ecea577d25ff752e681da2f5bed3e247e488f authored over 10 years ago by Luca Guidi <[email protected]>
Implemented size validation
36f1fb05ca73613199dad03318e464ca0080044f authored over 10 years ago by Luca Guidi <[email protected]>
36f1fb05ca73613199dad03318e464ca0080044f authored over 10 years ago by Luca Guidi <[email protected]>
Forgot to commit an example
621dec3afe321b528dc319f8544fd92d759215a4 authored over 10 years ago by Luca Guidi <[email protected]>
621dec3afe321b528dc319f8544fd92d759215a4 authored over 10 years ago by Luca Guidi <[email protected]>
Implemented acceptance validations
ff58b6682c3245734577d2c53ef7c6d72b5dde82 authored over 10 years ago by Luca Guidi <[email protected]>
ff58b6682c3245734577d2c53ef7c6d72b5dde82 authored over 10 years ago by Luca Guidi <[email protected]>
Refactoring: DRY AttributeValidator implementation
591ff0eb20e944a526dcfca0be0af34d7118f363 authored over 10 years ago by Luca Guidi <[email protected]>
591ff0eb20e944a526dcfca0be0af34d7118f363 authored over 10 years ago by Luca Guidi <[email protected]>
Merge branch 'viking-inclusion'
454d0ce47d871bad2605e83b314ac87862a5150f authored over 10 years ago by Luca Guidi <[email protected]>
454d0ce47d871bad2605e83b314ac87862a5150f authored over 10 years ago by Luca Guidi <[email protected]>
Merge branch 'inclusion' of https://github.com/viking/validators into viking-inclusion
Conflicts:
lib/lotus/validations.rb
Require lotus/utils from GH
a45830d3f16c53b876bb410101a34b5ee4637515 authored over 10 years ago by Luca Guidi <[email protected]>
a45830d3f16c53b876bb410101a34b5ee4637515 authored over 10 years ago by Luca Guidi <[email protected]>
Enable services. README.
f42ab50e01c4924554eb6193fea17e4bedf10ccd authored over 10 years ago by Luca Guidi <[email protected]>
f42ab50e01c4924554eb6193fea17e4bedf10ccd authored over 10 years ago by Luca Guidi <[email protected]>
Refactoring. Extracted AttributeValidator.
41931b9de0d640bc9e9d48788b70b3fa0395ce81 authored over 10 years ago by Luca Guidi <[email protected]>
41931b9de0d640bc9e9d48788b70b3fa0395ce81 authored over 10 years ago by Luca Guidi <[email protected]>
Implemented basic inclusion validation
2fa6a34c25e1bf5fc41670704525df3cf4007205 authored over 10 years ago by Jeremy Stephens <[email protected]>
2fa6a34c25e1bf5fc41670704525df3cf4007205 authored over 10 years ago by Jeremy Stephens <[email protected]>
Log and expose errors
a02e0f8ea95249753251bc7524ef2d821653e21b authored over 10 years ago by Luca Guidi <[email protected]>
a02e0f8ea95249753251bc7524ef2d821653e21b authored over 10 years ago by Luca Guidi <[email protected]>
Implemented basic format validation
ed8e0b168de06e117d42f52aca2f739c4276f34f authored over 10 years ago by Luca Guidi <[email protected]>
ed8e0b168de06e117d42f52aca2f739c4276f34f authored over 10 years ago by Luca Guidi <[email protected]>
Use Hash over Set as attributes registry
ca13d6ff1c9df6523e7ac7e487e147eaed6671fd authored over 10 years ago by Luca Guidi <[email protected]>
ca13d6ff1c9df6523e7ac7e487e147eaed6671fd authored over 10 years ago by Luca Guidi <[email protected]>
Implemented basic validation presence
b8d1effe7bf945bc990d4633746efb6a79de4b0e authored over 10 years ago by Luca Guidi <[email protected]>
b8d1effe7bf945bc990d4633746efb6a79de4b0e authored over 10 years ago by Luca Guidi <[email protected]>
Ensure that getters are defined only in one class
b2f9f8c4ebe99e3768b0b75a86976ae340dd3568 authored over 10 years ago by Luca Guidi <[email protected]>
b2f9f8c4ebe99e3768b0b75a86976ae340dd3568 authored over 10 years ago by Luca Guidi <[email protected]>
Ensure that attributes are returned after initialization
9ed9ff74aa9b74ad5b28575970b1d8fb34323472 authored over 10 years ago by Luca Guidi <[email protected]>
9ed9ff74aa9b74ad5b28575970b1d8fb34323472 authored over 10 years ago by Luca Guidi <[email protected]>
Introduced coercions :airplane:
Example:
require 'lotus/validations'
class SignupParams
include Lotus::Validations
...
e9e309df5bf9f5608ec3fcbae8f66b238e45355c authored over 10 years ago by Luca Guidi <[email protected]>
Setup dependencies :airplane:
aec4288737f6a9d8abb759a4e7e34207d480d930 authored over 10 years ago by Luca Guidi <[email protected]>
aec4288737f6a9d8abb759a4e7e34207d480d930 authored over 10 years ago by Luca Guidi <[email protected]>
Initial mess
298978a7f8860a49c3897eebf048e54793ec1c2b authored over 10 years ago by Luca Guidi <[email protected]>
298978a7f8860a49c3897eebf048e54793ec1c2b authored over 10 years ago by Luca Guidi <[email protected]>