Skip to content

Commit

Permalink
Merge pull request #36 from NFSS10/ns/fix_validation_all
Browse files Browse the repository at this point in the history
Allow not iterable sequence in yonius.all() validation
  • Loading branch information
joamag committed Jun 15, 2021
2 parents 94f3217 + 3dce1b4 commit fad2e86
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/util/validation.js
Expand Up @@ -153,6 +153,7 @@ export const stringEq = function(valueC, message = "Must be exactly %{1} charact

export const all = function(validation) {
const _validation = (sequence, ctx) => {
if (sequence === null) return true;
for (const value of sequence) {
validation(value, ctx);
}
Expand Down

0 comments on commit fad2e86

Please sign in to comment.